home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 010a / super25n.zip / FUNCTION.DOC < prev    next >
Text File  |  1993-01-05  |  123KB  |  4,000 lines

  1.  
  2.                     ┌───────────────────────────────┐
  3.                     │         SuperLib 2.50         │
  4.                     │    For Clipper S87 and 5.01   │
  5.                     │    -------------------------  │
  6.                     │       copyright 1990          │
  7.                     │      Garry A Prefontaine      │
  8.                     └───────────────────────────────┘
  9.  
  10. ---------------------------------------------------------------------
  11. FUNCTION: ABORT()          Pops up dialog box asking: Abort?  Yes No
  12.  
  13.     Pops up dialog box asking: Abort?  Yes No
  14.  Returns
  15.     <expL> .t. for Yes .f. for No
  16.  Category
  17.     Popup
  18.  Syntax
  19.     ABORT([expC],[expN1],[expN2],[expN3],[expN4])
  20.  Description
  21.     Tests if escape key was pressed at last wait state.
  22.     If escape key was pressed, pops up a dialog box asking
  23.     [Abort]  [Don't Abort]
  24.     Returns .t. if [Abort], .f. if [Don't Abort] or .f. if
  25.     last key not 27 (escape key).
  26.  Options
  27.     Box color is C_POPMENU or optionally [expC]
  28.     Box dimensions are: 9,29,13,51 or optionally
  29.     [expN1],[expN2],[expN3],[expN4]
  30.  Examples
  31.     INKEY(0)
  32.     IF ABORT()  && test for lastkey() = 27
  33.         exit
  34.     ENDIF
  35.     do while .t.
  36.       @10,10 get answer
  37.       read
  38.       if abort("+GR/R",10,10,20,20)
  39.         loop
  40.       else
  41.         exit
  42.       endif
  43.     enddo
  44.  Warnings
  45.     Uses MENU TO so may blow get stack if called in
  46.     the middle of a read.
  47.  File
  48.     S_ABORT.PRG
  49.  
  50. ---------------------------------------------------------------------
  51. FUNCTION: ADDSPACE()       Pads string with spaces
  52.  
  53.     Pads string with spaces
  54.  Returns
  55.     <expC> String padded with spaces.
  56.  Category
  57.     String
  58.  Syntax
  59.     ADDSPACE(<expC>,<expN>)
  60.  Description
  61.     Pads right side of <expC> with <expN> spaces.
  62.     Truncates string if <expN> is shorter than
  63.     original string length.
  64.  Examples
  65.     ADDSPACE("GARRY",10)
  66.     results in "GARRY            "
  67.     ADDSPACE("GARRY",3)
  68.     results in "GAR"
  69.  Notes:
  70.     Of course in Clipper 5.01, the function PADR() does
  71.     the same thing.
  72.  File
  73.     S_ADDSP.PRG
  74.  
  75. ---------------------------------------------------------------------
  76. FUNCTION: AKOUNT()         Counts exact matches of value in array
  77.  
  78.     Counts exact matches of value in array
  79.  Returns
  80.     Number of matches
  81.  Category
  82.     Array
  83.  Syntax
  84.     AKOUNT(<array>,<exp?>)
  85.  Description
  86.     Counts # of exact matches of <exp?> in
  87.     <array>. <exp?> can be of any type.
  88.  Examples
  89.     AFIELDS(m->fields,m->types)
  90.     ** count C fields
  91.     nbrofchar  = AKOUNT(m->types,"C")
  92.     ** count N fields
  93.     nbrofnum    = AKOUNT(m->types,"N")
  94.     ** count D fields
  95.     nbrofdate  = AKOUNT(m->types,"D")
  96.     ** count L fields
  97.     nbroflogic = AKOUNT(m->types,"L")
  98.     ** count M fields
  99.     nbrofmemos = AKOUNT(m->types,"M")
  100.  File
  101.     S_AKOUNT.PRG
  102.  
  103. ---------------------------------------------------------------------
  104. FUNCTION: ALLBUT()         Returns all but last x characters
  105.  
  106.     Returns all but last x characters
  107.  Returns
  108.     <expC> all but last <x> characters
  109.  Category
  110.     String
  111.  Syntax
  112.     ALLBUT(<expC>,<expN>)
  113.  Description
  114.     Returns all but the rightmost <expN> letters
  115.     of <expC>
  116.  Examples
  117.     string = "SUPERFUNCTION"
  118.     string = ALLBUT(string,8)
  119.     (returns "SUPER")
  120.     string = ALLBUT(string,1)
  121.     (returns "SUPE")
  122.  Notes
  123.     Useful when you don't know the length of
  124.     a string in order to take left(x) characters.
  125.  File
  126.     S_ALLBUT.PRG
  127.  
  128. ---------------------------------------------------------------------
  129. FUNCTION: APPENDIT()       Intelligent APPEND FROM replacement
  130.  
  131.     Intelligent APPEND FROM replacement
  132.  Returns
  133.     Nothing
  134.  Category
  135.     Metafunction
  136.  Syntax
  137.     APPENDIT()
  138.  Description
  139.     Allows appending records from a database
  140.     of dissimiliar structures, allowing
  141.     point-and-shoot selection of field to field
  142.     import. Import All/Query matches/Tagged records.
  143.     There are no parameters, but a database is
  144.     required to be open.
  145.  Examples
  146.     USE CUSTOMER
  147.     APPENDIT()
  148.  Notes
  149.     This can be painfully slow on a busy network
  150.  File
  151.     S_APPEND.PRG
  152.  
  153. ---------------------------------------------------------------------
  154. FUNCTION: ARRANGE()        Rearranges text in a string
  155.  
  156.     Rearranges text in a string
  157.  Returns
  158.     <expC> rearranged
  159.  Category
  160.     String
  161.  Syntax
  162.     ARRANGE(<expC>,<expN1>,<expN2>,<expN3>)
  163.  Description
  164.     Extracts text from <expC1> starting at
  165.     <expN1> for a length of <expN2> and moves
  166.     it to position <expN3>.
  167.  Examples
  168.     string = "SUPERFUNCTION"
  169.     string = ARRANGE(string,6,8,1)
  170.     (returns "FUNCTIONSUPER")
  171.  Notes
  172.     New position is position AFTER text is cut
  173.     from original position
  174.  File
  175.     S_ARRANG.PRG
  176.  
  177. ---------------------------------------------------------------------
  178. FUNCTION: BEGEND()         Determines beginning or end of week,month or quarter
  179.  
  180.     Determines beginning or end of week,month or quarter
  181.  Returns
  182.     <expD> beginning or end of week,month,quarter of date
  183.  Category
  184.     Date
  185.  Syntax
  186.     BEGEND(<expD>,<expN1>,<expN2>,<expN3>)
  187.  Description
  188.     Returns date which is beginning (1) or end (0) <expN1>
  189.     of week (1) ,month (2) ,or quarter (3)  <expN2>
  190.     in which input date falls  <expD>
  191.  Options
  192.     If week, <expN3> is day of the week beginning or
  193.     end of the week <expN1> falls on, with sunday being
  194.     1 and saturday being 7.
  195.  Examples
  196.     cdate = ctod("01/15/90")
  197.     bow = BEGEND(cdate,1,1,1)  && beg of week
  198.     eow = BEGEND(cdate,0,1,7)  && end of week
  199.     bom = BEGEND(cdate,1,2) && beg of month
  200.     eow = BEGEND(cdate,0,2) && end of month
  201.     boq = BEGEND(cdate,1,3) && beg of quarter
  202.     eoq = BEGEND(cdate,0,3) && end of quarter
  203.  File
  204.     S_BEGEND.PRG
  205.  
  206. ---------------------------------------------------------------------
  207. FUNCTION: BLDARR()         Builds an array from a delimited string
  208.  
  209.     Builds an array from a delimited string
  210.  Returns
  211.     Nothing
  212.  Category
  213.     Array
  214.  Syntax
  215.     BLDARR(<array>|<expC1>,<expN>,<expC2>)
  216.  Description
  217.     Fills in the elements of an existing array
  218.     <expC1>|<array> with <expN> character values
  219.     extracted from a delimited string <expC2> of
  220.     the form "Garry:Wyn:Ralph:Ed". The colon [:]
  221.     is the delimiter.
  222.  Options
  223.     The first parameter may be either an array
  224.     OR the name of an array (to retain
  225.     compatibility with an older version when I knew
  226.     even less about parameters than I do now)
  227.  Examples
  228.     declare lunch[3]
  229.     BLDARR(m->lunch,3,"Pizza:Chicken:Burgers")
  230.  Notes
  231.     Array must be declared prior to calling
  232.     Of course, in Clipper 5.01 you can also use:
  233.     myarray := {"Pizza","Chicken","Burgers"}
  234.  File
  235.     S_BLDAR.PRG
  236.  
  237. ---------------------------------------------------------------------
  238. FUNCTION: BLDDBF()         Create a DBF from a delimited string
  239.  
  240.     Create a DBF from a delimited string
  241.  Returns
  242.     <expL> based on success.
  243.  Category
  244.     DBF
  245.  Syntax
  246.     BLDDBF(<expC1>,<expC2>|<array>)
  247.  Description
  248.     Creates DBF file named <expC1> from delimited
  249.     strings in <expC2>|<array>.
  250.     Parameter 2 is either:
  251.     1.     a Delimited string in the
  252.           form  "name,type,[size],[decimals]:name,type..."
  253.          Fields delimited by colon, field elements
  254.           delimited by commas
  255.     2.     an array of delimited strings in
  256.         the form "name,type,[size],[decimals]". One field
  257.         per array element, field elements delimited
  258.         by commas.
  259.  Examples
  260.     1. Passing long delimited string
  261.         BLDDBF('CUSTOMER','LNAME,C,15:FNAME,C,10:
  262.         AGE,N,2:PROSPECT,L:')
  263.     2. Passing array of short delimited strings
  264.         declare newdbf[4]
  265.         newdbf[1]="LNAME,C,15"
  266.         newdbf[2]="FNAME,C,10"
  267.         newdbf[3]="AGE,N,2"
  268.         newdbf[4]="PROSPECT,L"
  269.         BLDDBF('CUSTOMER',M->newdbf)
  270.  Notes
  271.     BLDDBF() expects an unused area to work in, and
  272.     will return .f. if it detects a DBF open in the current area. An overwrite will not be allowed.
  273.     BLDDBF() uses Clipper's low level file functions
  274.     to create the DBF file
  275.     You could also use Clipper 5.01's DBCREATE()
  276.     function.
  277.  File
  278.     S_BLDBF.PRG
  279.  
  280. ---------------------------------------------------------------------
  281. FUNCTION: BLDNDX()         Interactively create a new index
  282.  
  283.     Interactively create a new index
  284.  Returns
  285.     <expC> New index name less extension
  286.  Category
  287.     Metafunction
  288.  Syntax
  289.     BLDNDX([array1],[array2],[array3])
  290.  Description
  291.     Allows point and shoot building of a new
  292.     index.
  293.  Options
  294.     <array1> - an array of legal field
  295.     names. If not passed, all fields in current
  296.     DBF will be used.
  297.     <array2> - an array of field descriptions.
  298.     If not passed,field names in current
  299.     DBF will be used.
  300.     Pass both or neither of these arrays.
  301.     NETWORK VERSION ONLY:
  302.     <array3> - an array of currently open
  303.     index files to be reopened on exit
  304.     from bldndx() (up to 10)
  305.  Examples
  306.     BLDNDX()
  307.      -- or --
  308.     declare ndxflds[4],ndxdesc[4],ndxopen[3]
  309.     ndxflds[1]="LASTNAME"
  310.     ndxflds[2]="FIRSTNAME"
  311.     ndxflds[3]="CITY"
  312.     ndxflds[4]="ZIP"
  313.     ndxdesc[1]="Last Name"
  314.     ndxdesc[2]="First Name"
  315.     ndxdesc[3]="City"
  316.     ndxdesc[4]="Zip Code"
  317.     ndxopen[1] ="CUSTOMER"
  318.     ndxopen[2] ="STATE"
  319.     ndxopen[3] ="ZIPCODE"
  320.     BLDNDX(m->ndxflds,m->ndxdesc,m->ndxopen)
  321.  Notes
  322.     All fields are converted to type Character.
  323.     The function NBR2STR() is used to create a usable
  324.     character expression from a numeric field by first
  325.     adding 1,000,000 to the number.
  326.     BLDNDX() does not display a progress bar in the
  327.     NETWORK VERSION
  328.  Warnings
  329.     Indexes created with this function will require
  330.     the functions DTOS() and NBR2STR() be loaded prior
  331.     to use if a date or numeric field is part of the
  332.     index.
  333.  File
  334.     S_BLDNDX.PRG
  335.  
  336. ---------------------------------------------------------------------
  337. FUNCTION: BOM()            Calculates beginning of the month date
  338.  
  339.     Calculates beginning of the month date
  340.  Returns
  341.     <expD> beginning of the month
  342.  Category
  343.     Date
  344.  Syntax
  345.     BOM(<expD>)
  346.  Description
  347.     Calculates beginning of the month from <expD>
  348.  Examples
  349.     adate = ctod("10/15/90")
  350.     bom = BOM(adate)
  351.     (returns  10/01/90)
  352.  Notes
  353.     Written by Greg Pumroy and Ross Poppel and used
  354.     with their permission
  355.  File
  356.     S_BOM.PRG
  357.  
  358. ---------------------------------------------------------------------
  359. FUNCTION: BOYEAR()         Determine beginning of year a date falls in
  360.  
  361.     Determine beginning of year a date falls in
  362.  Returns
  363.     <expD> date of the beginning of the year
  364.  Category
  365.     Date
  366.  Syntax
  367.     <expD> = BOYEAR([expD])
  368.  Description
  369.     Determines beginning of the year of a date
  370.     and returns it as <expD>.
  371.  Options
  372.     [expD] a date variable. Default is DATE()
  373.  Examples
  374.     begyear = BOYEAR(date())
  375.  File
  376.     S_BOYEAR.PRG
  377.  
  378. ---------------------------------------------------------------------
  379. FUNCTION: BUILDEX()        Interactively builds and returns an expression
  380.  
  381.     Interactively builds and returns an expression
  382.  Returns
  383.     <expC> an expression string
  384.  Category
  385.     Conversion
  386.  Syntax
  387.     <expC>=BUILDEX(<expC>,<expC>,<expL>,<array1..2>)
  388.  Description
  389.     Interactively builds and returns an expression.
  390.     (expression is in character string format)
  391.     Pass parameters of <expC1> - a descriptive name for
  392.     the expression, <expC2> an existing expression
  393.     (field,etc.), <expL> allow TYPE change by BUILDEX()
  394.  Options
  395.     Pass all or none of the following arrays
  396.     <Array1>  Field name array
  397.     <Array2>  Field description array
  398.  Examples
  399.     express =;
  400.          buildex("Indexexpression",COMPANY,.F.)
  401.  File
  402.     S_BUILD.PRG
  403.  
  404. ---------------------------------------------------------------------
  405. FUNCTION: CENTR()          Centers a string in x spaces
  406.  
  407.     Centers a string in x spaces
  408.  Returns
  409.     <expC> string centered
  410.  Category
  411.     String
  412.  Syntax
  413.     CENTR(<expC>,[expN])
  414.  Description
  415.     Centers <expC> in <expN> spaces
  416.  Options
  417.     <expN> spaces is optional. Default is current
  418.     string length
  419.  Examples
  420.     string = "Superfunction "
  421.     string = CENTR(string,20)
  422.     (returns "  Superfunction   "
  423.  Notes
  424.     In Clipper 5.01, use PADC(), which does the same
  425.     thing and faster.
  426.  File
  427.     S_CENTR.PRG
  428.  
  429. ---------------------------------------------------------------------
  430. FUNCTION: CLABEL()         Menu driven module for label management
  431.  
  432.     Menu driven module for label management
  433.  Returns
  434.     nothing
  435.  Category
  436.     Metafunction
  437.  Syntax
  438.     CLABEL([array1..3])
  439.  Description
  440.     This function requires no parameters and is
  441.     entirely menu driven. Clipper compatible LBL
  442.     files are created and maintained. Labels may
  443.     be printed by Query matches, by Tagging, or
  444.     all records. All Clipper formats are supported.
  445.  Options
  446.     Three arrays may be passed - array 1 is an array
  447.     of allowable field names. Array two is an array
  448.     of field descriptions. Array 3 is an array of
  449.     field types. All three must be passed, or none.
  450.     All fields are used as default, with field names
  451.     being the default field descriptions.
  452.  Examples
  453.     use CUSTOMER
  454.     CLABEL()
  455.         or
  456.     USE CUSTOMER
  457.     private flds[3],fdes[3],ftyp[3]
  458.     flds[1] = "fname"
  459.     flds[2] = "lname"
  460.     flds[3] = "mi"
  461.     fdes[1] = "First Name"
  462.     fdes[2] = "Last Name"
  463.     fdes[3] = "Middle Initial"
  464.     ftyp[1] = "C"
  465.     ftyp[2] = "C"
  466.     ftyp[3] = "C"
  467.     CLABEL(flds,fdes,ftyp)
  468.  Notes
  469.     Requires datafile to be open.
  470.     Creates and modifies Clipper compatible LBL files.
  471.     Does not call LABEL FORM - (which pulls in 18K )
  472.     instead, uses its own label printing routine.
  473.     Label printing routine compresses blank lines
  474.     (i.e. a 2nd address), as well as removing all but
  475.     single space in a line (i.e. FIRSTNAME+LASTNAME)
  476.  File
  477.     S_CLAB.PRG
  478.  
  479. ---------------------------------------------------------------------
  480. FUNCTION: CLS()            Clear the screen with optional color,character
  481.  
  482.     Clear the screen with optional color,character
  483.  Returns
  484.     Nothing
  485.  Category
  486.     Screen
  487.  Syntax
  488.     CLS([expN],[expC])
  489.  Description
  490.     Clear the screen.
  491.  Options
  492.     Optional color [expN] and character [expC].
  493.  Examples
  494.     CLS()   && clears screen with current color
  495.     CLS(48) && clears screen with black on cyan
  496.     CLS(8,chr(177))  && clears screen grey on black
  497.         && with character 177
  498.  Notes
  499.     Of course in Clipper 5.01 you can also do:
  500.     dispbox(0,0,24,79,repl(chr(177),9),"+N/N")
  501.     and get the same result.
  502.  File
  503.     S_CLS.PRG
  504.  
  505. ---------------------------------------------------------------------
  506. FUNCTION: COLPIK()         Allows selection of colors from a list
  507.  
  508.     Allows selection of colors from a list
  509.  Returns
  510.     Nothing
  511.  Category
  512.     Screen
  513.  Syntax
  514.     COLPIK()
  515.  Description
  516.     Gives the user a choice of 12 pre-defined
  517.     color combinations to choose from
  518.  Examples
  519.     COLPIK()
  520.     SETCOLOR(M->c_normcol)
  521.  Notes
  522.     Color combo is stored to COLORS.MEM, but is
  523.     not initialized until you issue a SETCOLOR()
  524.     See INITSUP() for notes on using an alternate
  525.     .mem file name (instead of COLORS.MEM)
  526.     See appendix for more info on colors usage by
  527.     the library.
  528.  File
  529.     S_COLPIK.PRG
  530.  
  531. ---------------------------------------------------------------------
  532. FUNCTION: COPYITOUT()      Copies records to a new DBF
  533.  
  534.     Copies records to a new DBF
  535.  Returns
  536.     nothing
  537.  Category
  538.     Metafunction
  539.  Syntax
  540.     COPYITOUT()
  541.  Description
  542.     Copies records to a new DBF, with query
  543.     and tagging options.
  544.  Examples
  545.     Use (dbf_file)
  546.     COPYITOUT()
  547.  File
  548.     S_COPY.PRG
  549.  
  550. ---------------------------------------------------------------------
  551. FUNCTION: CRUNCH()         Moves spaces in a string to end of string
  552.  
  553.     Moves spaces in a string to end of string
  554.  Returns
  555.     <expC> string with spaces moved to end
  556.  Category
  557.     String
  558.  Syntax
  559.     CRUNCH(<expC>,<expN>)
  560.  Description
  561.     Moves spaces to end of string <expC>
  562.     <expN> if 1 moves all but single spaces
  563.     to left of string. If 0 moves all spaces to end.
  564.  Examples
  565.     string = "SUPER    Library version 1.50"
  566.     string = CRUNCH(string,1)
  567.     (returns "SUPER Library version 1.50  "
  568.     string = CRUNCH(string,0)
  569.     (returns "SUPERLibraryversion1.50      "
  570.  Notes
  571.     Handy for names (i.e. FIRST and LAST)
  572.  File
  573.     S_CRUNCH.PRG
  574.  
  575. ---------------------------------------------------------------------
  576. FUNCTION: CTRLW()          Sends chr(23) (Control-W) to the keyboard
  577.  
  578.     Sends chr(23) (Control-W) to the keyboard
  579.  Returns
  580.     Nothing
  581.  Category
  582.     Keyboard
  583.  Syntax
  584.     SET KEY XXX to CTRLW
  585.  Description
  586.     Allows remapping a key to Ctrl-W - a common
  587.     Clipper EXIT key. CTRL-W is not a really
  588.     intuitive key, but is often required by
  589.     Clipper. I'll often set F10 to act as
  590.     Ctrl-W.
  591.  Examples
  592.     EXTERNAL CTRLW
  593.     SET KEY 27 to CTRLW  && remaps ESCAPE to CTRL-W
  594.  Notes
  595.     Declare as EXTERNAL i.e.
  596.     EXTERNAL CTRLW
  597.  File
  598.     S_CTRLW.PRG
  599.  
  600. ---------------------------------------------------------------------
  601. FUNCTION: DATECALC()       Adds/subtracts days,weeks,months,years to a date
  602.  
  603.     Adds/subtracts days,weeks,months,years to a date
  604.  Returns
  605.     <expD> new date
  606.  Category
  607.     Date
  608.  Syntax
  609.     DATECALC(<expD>),<expN>,<expN>)
  610.  Description
  611.     <expN1> is the number of units to add or subtract. If
  612.     negative, subtraction takes place.
  613.     <expN2> is the type of unit, where 1=days ,2=wks, 3=mnths, 4=yrs
  614.     <expD> is the target date, to which units are added
  615.     or subtracted.
  616.  Examples
  617.     adate   = ctod("10/15/89")
  618.     ** subtract 5 days
  619.     less5days  = DATECALC(adate,-5,1)
  620.     ** subtract 5 weeks
  621.     less5weeks = DATECALC(adate,-5,2)
  622.     ** add 5 months
  623.     add5months = DATECALC(adate,5,3)
  624.     ** add 5 years
  625.     add5years  = DATECALC(adate,5,4)
  626.  Notes
  627.     Month adding/subtracting where the day of current
  628.     month is greater than the # of days in the target
  629.     month is done by using the # of days in the target
  630.     month. i.e. 01/31/90 + 1 month = 02/28/90
  631.     If the input date is Feb 29th of a leap year, it
  632.     is adjusted to Feb 28th before month or year
  633.     calculations.
  634.     My thanks to Greg Pumroy and ross Poppel for input
  635.  File
  636.     S_DATCAL.PRG
  637.  
  638. ---------------------------------------------------------------------
  639. FUNCTION: DAYSIN()         Calculates number of days in a month
  640.  
  641.     Calculates number of days in a month
  642.  Returns
  643.     <expN> days in month of date
  644.  Category
  645.     Date
  646.  Syntax
  647.     DAYSIN(<expD>)
  648.  Description
  649.     Returns # of days in month <expD>
  650.  Examples
  651.     adate  = ctod("10/15/89")
  652.     dimonth= DAYSIN(adate)
  653.     (returns 31)
  654.  Notes
  655.     Leap year handling contributed by Ross Poppel
  656.  File
  657.     S_DAYSIN.PRG
  658.  
  659. ---------------------------------------------------------------------
  660. FUNCTION: DELARRAY()       Deletes all elements of an array
  661.  
  662.     Deletes all elements of an array
  663.  Returns
  664.     Nothing
  665.  Category
  666.     Array
  667.  Syntax
  668.     DELARRAY(<array>)
  669.  Description
  670.     Deletes all elements of an array. Basically
  671.     un-initializes the array.
  672.  Examples
  673.     * Say you wish to re-use an array, passing
  674.     * it to ACHOICE() each time around, and it
  675.     * may have different lengths each time. What
  676.     * you want to do is get rid of any extra
  677.     * elements before re-filling the array.
  678.     * e.g.
  679.     declare reuse[200]
  680.     *
  681.     DO WHILE .t.
  682.       * (code to pick and open dbf)
  683.       * (code to pick and open dbf)
  684.       afields(m->reuse)
  685.       fieldpick = achoice(10,10,20,40,m->reuse)
  686.       * (do something with field selected)
  687.       * (do something with field selected)
  688.       DELARRAY(m->reuse)
  689.     ENDDO
  690.  Notes
  691.     In 5.01 you can do afill(array,NIL) instead
  692.  File
  693.     S_DELAR.PRG
  694.  
  695. ---------------------------------------------------------------------
  696. FUNCTION: DELREC()         Dialog box to delete/undelete current record
  697.  
  698.     Dialog box to delete/undelete current record
  699.  Returns
  700.     <expN> If deleted 1, if undeleted-1, if no action 0
  701.  Category
  702.     Popup
  703.  Syntax
  704.     DELREC()
  705.  Description
  706.     Asks for delete/undelete record with menu prompt
  707.     and then deletes/undeletes or not
  708.     If current record is not deleted, prompt will be
  709.     DELETE  NOACTION
  710.     If current record is deleted, prompt will be
  711.     UNDELETE  NOACTION
  712.  Examples
  713.     IF m->choice = 6
  714.         delcount = DELREC()
  715.     ENDIF
  716.  File
  717.     S_DELET.PRG
  718.  
  719. ---------------------------------------------------------------------
  720. FUNCTION: DOYEAR()         Calculates day of the year from date
  721.  
  722.     Calculates day of the year from date
  723.  Returns
  724.     <expN> day of the year of date
  725.  Category
  726.     Date
  727.  Syntax
  728.     DOYEAR(<expD>)
  729.  Description
  730.     Calculates day of the year from <expD>
  731.  Examples
  732.     adate = ctod("10/15/90")
  733.     dom = DOYEAR(adate)
  734.     (returns 288)
  735.  File
  736.     S_DOYEAR.PRG
  737.  
  738. ---------------------------------------------------------------------
  739. FUNCTION: DTDIFF()         Returns difference between dates
  740.  
  741.     Returns difference between dates
  742.  Returns
  743.     <expN> days,weeks,months or years between dates
  744.  Category
  745.     Date
  746.  Syntax
  747.     DTDIFF(<expD>,<expD>,<expN>)
  748.  Description
  749.     Calculates difference between <expD1> and
  750.     <expD2> in quantity defined by <expN> as:
  751.     1=whole days 2=whole weeks
  752.     3=whole months 4=whole years
  753.  Examples
  754.     adate = ctod("10/15/89")
  755.     adate2= ctod("10/26/89")
  756.     diffdays = DTDIFF(adate,adate2,1)
  757.     diffweeks= DTDIFF(adate,adate2,2)
  758.     diffmonth= DTDIFF(adate,adate2,3)
  759.     diffyears= DTDIFF(adate,adate2,4)
  760.  File
  761.     S_DTDIFF.PRG
  762.  
  763. ---------------------------------------------------------------------
  764. FUNCTION: DTOW()           Converts date to words
  765.  
  766.     Converts date to words
  767.  Returns
  768.     <expC> date as words
  769.  Category
  770.     Date
  771.  Syntax
  772.     DTOW(<expD>)
  773.  Description
  774.     Returns date as words
  775.  Examples
  776.     adate = ctod("10/15/89")
  777.     wdate = DTOW(adate)
  778.     returns "October 15, 1989"
  779.  File
  780.     S_DTOW.PRG
  781.  
  782. ---------------------------------------------------------------------
  783. FUNCTION: DUPLOOK()        Locates possible duplicates based on user criteria
  784.  
  785.     Locates possible duplicates based on user criteria
  786.  Returns
  787.     nothing
  788.  Category
  789.     Metafunction
  790.  Syntax
  791.     DUPLOOK([expC],[array])
  792.  Description
  793.     Searches current dbf for exact duplicates of
  794.     field(s) selected by user. User picks a field
  795.     or fields, DUPLOOK() creates an index and prepares
  796.     a possible duplicates report.
  797.  Options
  798.     <expC> Character expression as additional info for
  799.     each report line printed. (report normally only
  800.     refers to record# and the fields selected )
  801.     <array> - an array of currently open
  802.     index files to be reopened on exit
  803.     from duplook() (up to 10)
  804.  Examples
  805.     private ndxopen[3]
  806.     ndxopen[1] ="CUSTOMER"
  807.     ndxopen[2] ="STATE"
  808.     ndxopen[3] ="ZIPCODE"
  809.     DUPLOOK("Lastname+'  '+Firstname",m->ndxopen)
  810.     * the fields the user picks to check duplicates
  811.     * on,the LASTNAME and FIRSTNAME fields are also
  812.     * printed on the report.
  813.     Sample Output:
  814.     Record #    FNAME
  815.         1    GARRY
  816.         2    GARRY
  817.  Warnings
  818.     THIS FUNCTION CLOSES ANY OPEN INDEXES.
  819.     YOU WILL NEED TO RE-OPEN INDEXES ON EXIT.
  820.     (UNLESS YOU PASS AN ARRAY OF OPEN INDEXES AS ABOVE...)
  821.  File
  822.     S_DUP.PRG
  823.  
  824. ---------------------------------------------------------------------
  825. FUNCTION: EDITDB()         Customized DBEDIT() with UDF
  826.  
  827.     Customized DBEDIT() with UDF
  828.  Returns
  829.     nothing
  830.  Category
  831.     Metafunction
  832.  Syntax
  833.     EDITDB([expL1],[expN],[array],[array],[expL2])
  834.  Description
  835.     Customized DBEDIT() interface allowing searching,
  836.     goto, vertical view and (if <expL1> is True) add
  837.     edit delete.
  838.     Also allows limiting of fields viewed.
  839.  Options
  840.     [expL] allows add-edit-delete or not. Number
  841.     of fields is contained in [expN]. The two arrays
  842.     are of field names and field descriptions. Default
  843.     is all fields, field names as descriptions.
  844.     [expL2] allows bypass of the "BROWSE ALL/SELECT FIELDS"
  845.     opening menu choice, and defaults to .f.
  846.  Examples
  847.     USE CUSTOMER
  848.     private flds[3],fdes[3]
  849.     flds[1] = "fname"
  850.     flds[2] = "lname"
  851.     flds[3] = "mi"
  852.     fdes[1] = "First Name"
  853.     fdes[2] = "Last Name"
  854.     fdes[3] = "Middle Initial"
  855.     editdb(.t.,3,flds,fdes)
  856.     ...
  857.     or
  858.     ...
  859.     USE CUSTOMER
  860.     editdb()
  861.     ...
  862.  Notes
  863.     Allows record deletion, but does not pack.
  864.     Does not 'SET DELETED' one way or the other.
  865.  File
  866.     S_EDIT.PRG
  867.  
  868. ---------------------------------------------------------------------
  869. FUNCTION: EDITMEMO()       Performs a windowed memoedit() on a memo field
  870.  
  871.     Performs a windowed memoedit() on a memo field
  872.  Returns
  873.     nothing
  874.  Category
  875.     Popup
  876.  Syntax
  877.     EDITMEMO([expC],[expN1..N4],[expL],[expN5])
  878.  Description
  879.     Pops up a box allowing editing of a memo field.
  880.     Escape exits, F10 saves.
  881.  Options
  882.     Edits field named MEMO by default, otherwise
  883.     fieldname passed as [expC]. Uses coordinates
  884.     2,10,20,69 unless passed coordinates as
  885.     [expN1..expn4] (top,left,bottom,right)
  886.     [expL] - .t. allow edit (default), .f. view only
  887.     [expN5] - line length - default is window width-1
  888.  Examples
  889.     editmemo()
  890.     editmemo("NOTES")
  891.     editmemo("NOTES",2,2,22,78)
  892.     editmemo("NOTES",2,2,22,78,.f.)
  893.  Notes
  894.     If editing, must have a box width of at least 50
  895.     Requires a memo FIELD - will not work on a memvar.
  896.  File
  897.     S_EDITM.PRG
  898.  
  899. ---------------------------------------------------------------------
  900. FUNCTION: ED_G_PIC()       Returns appropriate picture for a get
  901.  
  902.     Returns appropriate picture for a get
  903.  Returns
  904.     <expC> picture clause
  905.  Category
  906.     Editing
  907.  Syntax
  908.     ED_G_PIC(<expC>)
  909.  Description
  910.     Returns a picture clause appropriate for
  911.     editing field where <expC> is the name of the
  912.     field. Applicable to Character and numeric fields
  913.  Examples
  914.     @10,10 GET AMOUNT PICT ED_G_PIC("AMOUNT")
  915.     * would return a picture of "9999.99" depending
  916.     * on length and decimals
  917.  File
  918.     S_EDPICT.PRG
  919.  
  920. ---------------------------------------------------------------------
  921. FUNCTION: ENDSWITH()       Determines if a string ends with another string
  922.  
  923.     Determines if a string ends with another string
  924.  Returns
  925.     <expL>
  926.  Category
  927.     Logical
  928.  Syntax
  929.     ENDSWITH(<expC>,<expC)
  930.  Description
  931.     Determines if string 1 <expC1> ends with
  932.     string 2 <expC2>
  933.  Examples
  934.     str1    = "SUPERFUNCTION"
  935.     str2    = "FUNCTION"
  936.     str3    = "FUNKY"
  937.     ENDSWITH(str1,str2) returns .t.
  938.     ENDSWITH(str1,str3) returns .f.
  939.  File
  940.     S_ENDSW.PRG
  941.  
  942. ---------------------------------------------------------------------
  943. FUNCTION: ENHANCED()       Returns color integer for ENHANCED setting
  944.  
  945.     Returns color integer for ENHANCED setting
  946.  Returns
  947.     <expN> color integer for ENHANCED setting
  948.  Category
  949.     Screen
  950.  Syntax
  951.     enh = ENHANCED()
  952.  Description
  953.     Gets the 2nd part of the color string and
  954.     converts it to color INTEGER
  955.  Examples
  956.     enh = ENHANCED()
  957.     ATT(10,10,10,20,m->enh)
  958.  Notes
  959.     See appendix for more info on Super.Lib color
  960.     usage
  961.  File
  962.     S_ENHAN.PRG
  963.  
  964. ---------------------------------------------------------------------
  965. FUNCTION: EVALQ()          Evaluates a logical condition
  966.  
  967.     Evaluates a logical condition
  968.  Returns
  969.     Logical
  970.  Category
  971.     Evaluation
  972.  Syntax
  973.     if evalq(<expC>)
  974.  Description
  975.     Macro expands <expC> and returns logical result
  976.  Examples
  977.     locate for evalq(query_exp)
  978.  Notes
  979.     In Clipper 5.01, you're better off doing
  980.         queryblock := &("{||"+query_exp+"}")
  981.         locate for eval(queryblock)
  982.  File
  983.     S_EVALQ.PRG
  984.  
  985. ---------------------------------------------------------------------
  986. FUNCTION: FASTFORM()       Prints a selected formletter for current record
  987.  
  988.     Prints a selected formletter for current record
  989.  Returns
  990.     nothing
  991.  Category
  992.     Metafunction
  993.  Syntax
  994.     FASTFORM()
  995.  Description
  996.     Presents a picklist of formletters to print
  997.     against contents of current record.
  998.  Examples
  999.     If m->choice = 4    && form letter
  1000.         FASTFORM()
  1001.     endif
  1002.  Notes
  1003.     Utilizes a form created by FORMLETR() and plugs
  1004.     in values from the current record.
  1005.     Interface is a picklist of forms available.
  1006.     Depends on the current DBF to match the field
  1007.     values in the form.
  1008.  File
  1009.     S_FFORM.PRG
  1010.  
  1011. ---------------------------------------------------------------------
  1012. FUNCTION: FILEINFO()       Returns file date,time,size
  1013.  
  1014.     Returns file date,time,size
  1015.  Returns
  1016.     Returns file date,time,size
  1017.  Category
  1018.     File
  1019.  Syntax
  1020.     FILEINFO(<expC>,<expN>)
  1021.  Description
  1022.     Returns info on file in <expC> based on param passed
  1023.       1  - returns file size (numeric)
  1024.       2  - returns file date (date)
  1025.       3  - returns file time (character)
  1026.  Examples
  1027.     filesize  = fileinfo("customer.dbf",1)
  1028.  Warnings
  1029.     Will bomb if the file does not exist. Check
  1030.     for FILE() before calling
  1031.  File
  1032.     S_FILEIN.PRG
  1033.  
  1034. ---------------------------------------------------------------------
  1035. FUNCTION: FILEREAD()       Lists a text file of unlimited size
  1036.  
  1037.     Lists a text file of unlimited size
  1038.  Returns
  1039.     nothing
  1040.  Category
  1041.     Metafunction
  1042.  Syntax
  1043.     FILEREAD([expN1],[expN2],[expN3],[expN4],[expC])
  1044.  Description
  1045.     Lists text file [expC] of unlimited size in a user
  1046.     definable window. [expN1..expN4].
  1047.     Allows up down right left scrolling. Use this
  1048.     for reports or output sent to a disk file.
  1049.  Options
  1050.     If [expN1..expN4] are not passed, a default of
  1051.     window of dimensions 2,2,22,78 is used. If no
  1052.     filename [expC] is passed, a popup picklist is
  1053.     used to get a file name from the current
  1054.     directory.
  1055.  Examples
  1056.     REPORT FORM summary TO summary.txt
  1057.     FILEREAD(2,2,22,78,"SUMMARY.TXT")
  1058.  Notes
  1059.     Unlimited file size. Won't bomb like memoedit.
  1060.     However, not nearly as fast as memoedit and
  1061.     no editing capabilities.
  1062.     Fileread uses a 98% Clipper code routine to
  1063.     list text files.
  1064.     Fileread() will use SET DEFAULT if no path is
  1065.     specified. (NETWORK)
  1066.  File
  1067.     S_FILER.PRG
  1068.  
  1069. ---------------------------------------------------------------------
  1070. FUNCTION: FILLARR()        Fill type, length, decimal arrays
  1071.  
  1072.     Fill type, length, decimal arrays
  1073.  Returns
  1074.     Nothing
  1075.  Category
  1076.     Array
  1077.  Syntax
  1078.     FILLARR(<array1>,<array2>,[array3],[array4])
  1079.  Description
  1080.     Fills in TYPE, LENGTH and DECIMAL arrays
  1081.     (array2-4) given a FIELDNAME array (array1)
  1082.  Options
  1083.     Arrays (3 and 4) are optional.
  1084.  Examples
  1085.     number_of_flds = ALENG(m->fnames)
  1086.     declare fldtypes[number_of_flds]
  1087.     declare fldlens[number_of_flds]
  1088.     declare flddec[number_of_flds]
  1089.     FILLAR(fnames,fldtypes,fldlens,flddec)
  1090.  Notes
  1091.     In most circumstances you would fill all of these
  1092.     arrays with one call to AFIELDS(), but there are
  1093.     exceptions.
  1094.  Warnings
  1095.     Macro expands an expression to obtain type-could
  1096.     crash if expression passed is invalid.
  1097.  File
  1098.     S_FILLAR.PRG
  1099.  
  1100. ---------------------------------------------------------------------
  1101. FUNCTION: FORMLETR()       Interactive formletter and mailmerge utility
  1102.  
  1103.     Interactive formletter and mailmerge utility
  1104.  Returns
  1105.     nothing
  1106.  Category
  1107.     Metafunction
  1108.  Syntax
  1109.     FORMLETTER([array1..array3][array4..array6])
  1110.  Description
  1111.     Provides a menu driven interface to the
  1112.     creation, modification and merging of form
  1113.     letters with DBFs.
  1114.  Options
  1115.     Three field arrays may be passed - array 1 is an array
  1116.     of allowable field names. Array 2 is an array
  1117.     of field descriptions. Array 3 is an array of
  1118.     field types. All fields are used as
  1119.     a default, with field names being the default
  1120.     field descriptions.
  1121.     Three additional arrays may be passed for up to
  1122.     30 additional hotkeys. Array 4 is an array
  1123.     of functions which will be placed between
  1124.     «» delimiters. Array 5 is a corresponding
  1125.     descriptive array of these functions, to be
  1126.     shown when the user presses F1. Format:
  1127.         "hotkey        description "
  1128.         | column 1    |  column 17
  1129.     Array 6 is the corresponding hotkeys as their
  1130.     numeric ascii values. All three arrays must
  1131.     be passed, if any, and all must be of same
  1132.     length with no null or undefined elements.
  1133.     You could use these for Printer control, special
  1134.     combined fields, etc. Be sure the functions
  1135.     you wish to call are available to the linker,
  1136.     usually by declaring them EXTERNAL.
  1137.  Examples
  1138.     USE CUSTOMER
  1139.     private flds[3],fdes[3],ftype[3]
  1140.     PRIVATE U_EX[3],U_DE[3],U_KY[3]
  1141.     * field descriptions
  1142.     flds[1] = "fname"
  1143.     flds[2] = "lname"
  1144.     flds[3] = "mi"
  1145.     fdes[1] = "First Name"
  1146.     fdes[2] = "Last Name"
  1147.     fdes[3] = "Middle Initial"
  1148.     ftype[1]="C"
  1149.     ftype[2]="C"
  1150.     ftype[3]="C"
  1151.     * hotkey arrays
  1152.     * 1 - EXPRESSIONS - BE SURE THESE ARE DECLARED EXTERN
  1153.     *   (note: these are not actual functions in *the library - just examples of what you could *do)
  1154.     U_EX[1]= "BOLD_ON()"    && returns printer control for
  1155.     U_EX[3]= "BOLD_OFF()"   && bold on/off
  1156.     U_EX[2]= "DEARPHRASE()" && returns "Dear                        &&<name>"
  1157.     * 2 - DESCRIPTIONS FOR HELP SCREEN
  1158.     U_DE[1]= "F5    BOLD PRINT ON"
  1159.     U_DE[2]= "F6    BOLD PRINT OFF"
  1160.     U_DE[3]= "F7    INSERT DEAR <first> <last>"
  1161.     * 3 - KEY VALUES for hotkeys
  1162.     U_KY[1]= -4
  1163.     U_KY[2]= -5
  1164.     U_KY[3]= -6
  1165.     FORMLETR(flds,fdes,ftype,u_ex,u_de,u_ky)
  1166.     ...
  1167.     ....or....
  1168.     USE CUSTOMER
  1169.     FORMLETR()
  1170.     ...
  1171.  Notes
  1172.     Structure for database : FORM.DBF
  1173.      Field  Field Name  Type    Width        Dec
  1174.     .    1  DESCRIPT        Character    50
  1175.     .    2  MEMO_ORIG    Memo        10
  1176.     See INITSUP() for notes on using a different
  1177.     file name for FORM.DBF
  1178.  File
  1179.     S_FORML.PRG
  1180.  
  1181. ---------------------------------------------------------------------
  1182. FUNCTION: FREQANAL()       Performs a frequency analysis on a DBF
  1183.  
  1184.     Performs a frequency analysis on a DBF
  1185.  Returns
  1186.     nothing
  1187.  Category
  1188.     Metafunction
  1189.  Syntax
  1190.     FREQANAL()
  1191.  Description
  1192.     Performs a point&shoot frequency analysis
  1193.     on selected fields of the DBF. Allows for
  1194.     tallying of additional numeric fields.
  1195.  Examples
  1196.     USE (dbf_file)
  1197.     FREQANAL()
  1198.  File
  1199.     S_FREQ.PRG
  1200.  
  1201. ---------------------------------------------------------------------
  1202. FUNCTION: FULLDIR()        Interactively navigate directories
  1203.  
  1204.     Interactively navigate directories
  1205.  Returns
  1206.     <expL> Directory was selected
  1207.  Category
  1208.     Metafunction
  1209.  Syntax
  1210.     FULLDIR([expL],[@expC])
  1211.  Description
  1212.     Interactively navigates directories on the
  1213.     current drive. Allows pop-up list of
  1214.     files in a directory. Allows reading of a
  1215.     file ( with FILEREAD() ) in a directory.
  1216.     If file is DBF, does a DBEDIT browse (watch
  1217.     your memory..)
  1218.  Options
  1219.     [expL]     True - change to selected directory
  1220.             False - don't change to selected directory
  1221.             Default is True - change
  1222.     [@expC]     Char string passed by reference, will                 contain name of selected directory on                 return.
  1223.  Examples
  1224.     NEWDIR = ""
  1225.     if FULLDIR(.F.,@NEWDIR)
  1226.         SET DEFAULT TO (NEWDIR)
  1227.         ?"New directory is:"
  1228.         ?Curdir()
  1229.     endif
  1230.  File
  1231.     S_FULLD.PRG
  1232.  
  1233. ---------------------------------------------------------------------
  1234. FUNCTION: GENED()          Generic dbf editing screen
  1235.  
  1236.     Generic dbf editing screen
  1237.  Returns
  1238.     nothing
  1239.  Category
  1240.     Metafunction
  1241.  Syntax
  1242.     GENED([expL],[expN1],[expN2],[array1],[array2])
  1243.  Description
  1244.     Edit ( [expL]=.f.) current record or
  1245.     Add  ( [expL]=.t.) new record.
  1246.  Options
  1247.     Window top [expN1] and bottom [expN2] default to
  1248.     centered.
  1249.     Use optional [array1] (field names) and
  1250.     [array2] (field descriptions), or use all fields
  1251.     in dbf.
  1252.  Examples
  1253.     use Customer index Customer
  1254.     Gened(.f.,2,20) && edit
  1255.     ...
  1256.     or
  1257.     use Customer index Customer
  1258.     Gened(.t.,3,15) && add
  1259.     ...
  1260.     or
  1261.     use Customer index Customer
  1262.     Gened() && edit
  1263.     ...
  1264.  Notes
  1265.     Allows memo editing (multiple memo fields)
  1266.  File
  1267.     S_GENED.PRG
  1268.  
  1269. ---------------------------------------------------------------------
  1270. FUNCTION: GENVAL()         Generic VALID clause validation with message
  1271.  
  1272.     Generic VALID clause validation with message
  1273.  Returns
  1274.     <expL> logical result of passed condition
  1275.  Category
  1276.     Editing
  1277.  Syntax
  1278.     GENVAL(<expC1>,<expC2>)
  1279.  Description
  1280.     Evaluates macro expansion of <expC1> as a logical
  1281.     value. If result is False, displays message <expC2>
  1282.     and waits for a keypress.
  1283.  Examples
  1284.     if genval("fcount() < 60",'Too many fields')
  1285.         COPY TO TEMP
  1286.     endif
  1287.     * ...or as a VALID CLAUSE
  1288.     @10,10 get m->lname VALID ;
  1289.     GENVAL("!empty(lname)","Need a last name")
  1290.  File
  1291.     S_GENVA.PRG
  1292.  
  1293. ---------------------------------------------------------------------
  1294. FUNCTION: GETAKEY()        Gets intent of last keystroke
  1295.  
  1296.     Gets intent of last keystroke
  1297.  Returns
  1298.     <expC> as key direction (FWD,BWD,ESC,CTW,UNK)
  1299.  Category
  1300.     Editing
  1301.  Syntax
  1302.     GETAKEY(lastkey())
  1303.  Description
  1304.     Gives key direction of last key, for evaluating
  1305.     what direction in a read the user is heading.
  1306.  Examples
  1307.     If GETAKEY(LASTKEY())="FWD"
  1308.         active_field = active_field+1
  1309.     elseif GETAKEY(LASTKEY())="BWD"
  1310.         active_field = active_field-1
  1311.     endif
  1312.  File
  1313.     S_GETKEY.PRG
  1314.  
  1315. ---------------------------------------------------------------------
  1316. FUNCTION: GETCALC()        Pops up a quick 'solar' calculator
  1317.  
  1318.     Pops up a quick 'solar' calculator
  1319.  Returns
  1320.     <expN>/<expC> total from calculator
  1321.  Category
  1322.     Popup
  1323.  Syntax
  1324.     GETCALC([expN],[expL])
  1325.  Description
  1326.     Pop up 'solar' calculator for simple
  1327.     arithmetic
  1328.  Options
  1329.     [expN]  starting number
  1330.     [expL]  return as character string (default .t.)
  1331.  Examples
  1332.     GETCALC(5)
  1333.  Notes
  1334.     Written by ROSS S. POPPEL and GREGORY W. PUMROY
  1335.     (of the Philidelphia Clipper Users Group.)
  1336.  File
  1337.     S_GETCAL.PRG
  1338.  
  1339. ---------------------------------------------------------------------
  1340. FUNCTION: GETDATE()        Point and shoot calendar
  1341.  
  1342.     Point and shoot calendar
  1343.  Returns
  1344.     <expD> date selected
  1345.  Category
  1346.     Popup
  1347.  Syntax
  1348.     GETDATE([expD])
  1349.  Description
  1350.     Allows user to point to and select a date
  1351.  Options
  1352.     [expD] optional date parameter to start with.
  1353.     If no date passed, system date is used.
  1354.  Examples
  1355.     set key -1 to GETDATE
  1356.  Notes
  1357.     Written by Ross Poppel / Greg Pumroy
  1358.  File
  1359.     S_GETDAT.PRG
  1360.  
  1361. ---------------------------------------------------------------------
  1362. FUNCTION: GETDFP()         Gets SET DEFAULT path
  1363.  
  1364.     Gets SET DEFAULT path
  1365.  Returns
  1366.     SET DEFAULT path as string
  1367.  Category
  1368.     Environment
  1369.  Syntax
  1370.     GETDFP()
  1371.  Description
  1372.     Retrieves and returns SET DEFAULT path from
  1373.     Clipper. Appends a "\" if needed. If no SET
  1374.     DEFAULT is active, returns an empty string ""
  1375.  Examples
  1376.     ERASE (getdfp()+tempfile)
  1377.  Notes
  1378.     Calls SET(). This is a built in Clipper 5.0
  1379.     function, for which a semi-replacement has been
  1380.     provided for S87. The S87 version accesses S87
  1381.     internals, but these are not likely to change
  1382.     anymore <grin>.
  1383.  File
  1384.     S_GETDFP.PRG
  1385.  
  1386. ---------------------------------------------------------------------
  1387. FUNCTION: GLOBREP()        Performs global selective replace of a field
  1388.  
  1389.     Performs global selective replace of a field
  1390.  Returns
  1391.     nothing
  1392.  Category
  1393.     Metafunction
  1394.  Syntax
  1395.     GLOBREP()
  1396.  Description
  1397.     Allows user to point to a field
  1398.     and then enter a replacement
  1399.     value for it. Replacement can be executed for
  1400.     all records, query matches, or tagged records.
  1401.  Examples
  1402.     If choice = 9  && Global replace
  1403.         GLOBREP()
  1404.     endif
  1405.  Warnings
  1406.     These changes are, of course, permanent.
  1407.  File
  1408.     S_GLOBR.PRG
  1409.  
  1410. ---------------------------------------------------------------------
  1411. FUNCTION: HELP()           Provides context sensitive popup help
  1412.  
  1413.     Provides context sensitive popup help
  1414.  Returns
  1415.     nothing
  1416.  Category
  1417.     Help
  1418.  Syntax
  1419.     SET KEY xxx TO HELP
  1420.  Description
  1421.     By setting a key xxx to this function, the
  1422.     current PROC and VARIABLE are passed to it
  1423.     when the key is pressed during the program.
  1424.     By comparing the PROC and VARIABLE parameters
  1425.     against entries in the HELP.DBF, HELP() can
  1426.     then provide the appropriate help screen for
  1427.     the user. If no matching record is found, HELP()
  1428.     displays a 'No Help Found' message to the user.
  1429.     HELP() works in conjunction with HELPMOD() which
  1430.     is used to create help screen records for the
  1431.     HELP.DBF. HELPMOD() allows online creation and
  1432.     modification of the size, location and contents
  1433.     of the help screen for the current PROC,VARIABLE
  1434.     combination.
  1435.     It is important to issue the following statement
  1436.     in your code: EXTERNAL HELP
  1437.  Examples
  1438.     EXTERNAL HELP
  1439.     SET KEY 28 to HELP
  1440.  Notes
  1441.     Will not be much use during ACHOICE or MENU TO
  1442.  Warnings
  1443.     The SET KEY that called this proc is still active
  1444.     inside the proc. You may wish to modify the proc
  1445.     to turn off/on the set key.
  1446.     i.e. if called with key 28 (F1)
  1447.     at start :     SET KEY 28 to
  1448.     at end:     SET KEY 28 to HELP
  1449.  File
  1450.     S_HELP.PRG
  1451.  
  1452. ---------------------------------------------------------------------
  1453. FUNCTION: HELPMOD()        Interactively build and modify help screens
  1454.  
  1455.     Interactively build and modify help screens
  1456.  Returns
  1457.     nothing
  1458.  Category
  1459.     Development
  1460.  Syntax
  1461.     SET KEY xxx TO HELPMOD
  1462.  Description
  1463.     HELPMOD() creates and modifies help screens for
  1464.     HELP() which are stored in HELP.DBF.
  1465.     HELPMOD() allows online creation and
  1466.     modification of the size, location and contents
  1467.     of the help screen for the current PROC,VARIABLE
  1468.     combination, and stores the results in HELP.DBF.
  1469.     HELPMOD() is intended to be used online, during
  1470.     program execution, by the developer/programmer.
  1471.     It can be removed after development.
  1472.     By setting a key xxx to this function, the
  1473.     current PROC and VARIABLE are passed to it
  1474.     when the key is pressed during the program.
  1475.     By comparing the PROC and VARIABLE parameters
  1476.     against entries in the HELP.DBF, HELPMOD() can
  1477.     then provide the appropriate help screen for
  1478.     modification, or, if no matching record is found,
  1479.     allow creation of a new help screen record.
  1480.     It is important to issue the following statement
  1481.     in your code: EXTERNAL HELPMOD
  1482.     This is due to Clipper not recognizing and linking
  1483.     in procs that are only referenced as SET KEY's.
  1484.     HELP.DBF is created if not present.
  1485.  Examples
  1486.     EXTERNAL HELPMOD
  1487.     SET KEY -30 TO HELPMOD  && alt-F1
  1488.  Notes
  1489.     Will not be much use during ACHOICE or MENU TO
  1490.  File
  1491.     S_HELPM.PRG
  1492.  
  1493. ---------------------------------------------------------------------
  1494. FUNCTION: INITSUP()    ***    Initializes global variables and conditions
  1495.  
  1496.     Initializes global variables and conditions
  1497.  Returns
  1498.     Nothing
  1499.  Category
  1500.     Environment
  1501.  Syntax
  1502.     INITSUP()
  1503.  Description
  1504.     The first time INITSUP() is called, it simply initializes
  1505.     the global variables expected by Super.Lib functions if
  1506.     they are not already present. On subsequent calls, INITSUP() does nothing.
  1507.     QUERY_EXP is set to "". This is the global
  1508.     variable used to store the last query built
  1509.     with QUERY(), and is accesses by many Super.Lib
  1510.     functions.
  1511.     _SUPERPRN is set to "LPT1". This is the default
  1512.     printer for Super.Lib output.
  1513.     _CHECKPRN is initialized to .T. This variable
  1514.     tells P_READY() whether or not it should attempt
  1515.     to check the printer status. On a redirected
  1516.     printer on a LAN this should be set to .F., as
  1517.     ISPRN() will not work.
  1518.     INITSUP() will look for a variable called _SUPISCOLOR. If it is present and of type "L", its value will be used in place of ISCOLOR(). You may want to initialize a public variable _SUPISCOLOR
  1519.     if you have one of those card/monitor
  1520.     combos that fool ISCOLOR().
  1521.     Advanced INITSUP() settings:
  1522.     System files (used by Super.Lib) all have default
  1523.     names which may be overridden. The defaults are
  1524.     contained in a set of public variables. They are:
  1525.         _REPORTS    = "SFREPORT" (for reports)
  1526.         _FORMS    = "FORM"    (for form letters)
  1527.         _QUERIES    = "QUERIES"    (for queries)
  1528.         _LISTER    = "PLIST"    (for lister)
  1529.         _TODODBF    = "TODO"    (for todo list)
  1530.         _TODONTX1    = "TODO"    (TODO category                         INDEX)
  1531.         _TODONTX2    = "TODOP"    (TODO priority                             INDEX)    
  1532.         _TODONTX3    = "TODOD"    (TODO do by                             INDEX)
  1533.         _HELP        = "HELP"    (for help)
  1534.         _SCROLLER    = "SCROLLER"    (for scroller)
  1535.         _COLORS    = "COLORS"    (for colors)
  1536.     to override a system file name, set the variable name
  1537.     to a name of your choice BEFORE the first call to
  1538.     INITSUP(). Do not use an extension.
  1539.  Examples
  1540.     * beginning of top level program
  1541.     _REPORTS = "C:\AMY\REPORTS"
  1542.     _QUERIES = "C:\AMY\QUERIES"
  1543.     INITSUP()
  1544.     _SUPERPRN = "LPT2"
  1545.  Notes
  1546.     Its always a good idea to call this at your
  1547.     top level program. All of the superfunctions
  1548.     doing screen i/o call it. It initializes the
  1549.     global variable _SUPERFUNC the first time it
  1550.     is called. Thereafter, the initialization
  1551.     routines are not called if _SUPERFUNC exists.
  1552.     (see the opening IF statement)
  1553.  File
  1554.     S_INIT.PRG
  1555.  
  1556. ---------------------------------------------------------------------
  1557. FUNCTION: ISLOADED()       Determines  function is loaded or not
  1558.  
  1559.     Determines  function is loaded or not
  1560.  Returns
  1561.     <expL> is ISLOADED(<expC>) loaded
  1562.  Category
  1563.     Environment
  1564.  Syntax
  1565.     <expL> = ISLOADED(<expC>)
  1566.  Description
  1567.     This function will test for <expC> being loaded
  1568.     into memory. <expC> can be any function in the form
  1569.     "FUNCTION()" but must refer to a function NOT in
  1570.     CLIPPER.LIB.
  1571.  Examples
  1572.     if ISLOADED("QUERY()")
  1573.         @row()+1,3 prompt "Build Query"
  1574.     endif
  1575.  File
  1576.     S_ISLOAD.PRG
  1577.  
  1578. ---------------------------------------------------------------------
  1579. FUNCTION: ISPART()         Determines if a number is part of a set
  1580.  
  1581.     Determines if a number is part of a set
  1582.  Returns
  1583.     <expL> if number is part of set
  1584.  Category
  1585.     Logical
  1586.  Syntax
  1587.     ISPART(<expN1>,<expN2>,<expN3>,...<expN10>)
  1588.  Description
  1589.     Compares a number <expN1> to a set of numbers
  1590.     <expN2..expN10> to determine if it is equal to
  1591.     any of them. Returns True if it is, False otherwise.
  1592.  Options
  1593.     Up to 9 numbers to compare.
  1594.  Examples
  1595.     If ISPART(choice,5,6,7,12)
  1596.       MSG("Need a DBF open")
  1597.       loop
  1598.     endif
  1599.  File
  1600.     S_ISPART.PRG
  1601.  
  1602. ---------------------------------------------------------------------
  1603. FUNCTION: KBDESC()         Keyboards character 27 (escape) when key pressed
  1604.  
  1605.     Keyboards character 27 (escape) when key pressed
  1606.  Returns
  1607.     nothing
  1608.  Category
  1609.     Keyboard
  1610.  Syntax
  1611.     SET KEY xxx TO KBDESC
  1612.  Description
  1613.     Allows setting an alternate key to the ESCAPE
  1614.     key. ESCAPE normally means 'get me outta here',
  1615.     but sometimes is the key you need to indicate
  1616.     the user is done selecting or some such. This
  1617.     function allows setting another key (e.g. F10)
  1618.     to act as the ESCAPE key.
  1619.  Examples
  1620.     SET KEY -9 TO KBDESC
  1621.  Notes
  1622.     Declare as EXTERNAL i.e.
  1623.     EXTERNAL KBDESC
  1624.  Warnings
  1625.     Be sure to issue a SET KEY xxx TO command to
  1626.     un-map this function when done
  1627.  File
  1628.     S_KBDESC.PRG
  1629.  
  1630. ---------------------------------------------------------------------
  1631. FUNCTION: LISTER()         Build, format,print lists to printer,screen,file
  1632.  
  1633.     Build, format,print lists to printer,screen,file
  1634.  Returns
  1635.     nothing
  1636.  Category
  1637.     Metafunction
  1638.  Syntax
  1639.     LISTER([array1],[array2])
  1640.  Description
  1641.     A menu driven utility for creation, printing and
  1642.     storage of list definitions.
  1643.     The user is asked to pick the fields to be
  1644.     included on the list. The selected fields, in the
  1645.     order in which they will be listed, are shown in
  1646.     the bottom information box.
  1647.     The user may select which records are to be
  1648.     included in the list - all records, query matches
  1649.     or tagged records.
  1650.     The user may select output as PRINTER, SCREEN or
  1651.     FILE, and choose the maximum line length to avoid
  1652.     printer wraparound.
  1653.     The user may save list definitions to PLIST.DBF
  1654.     and later restore them.
  1655.  Options
  1656.     Two arrays may be passed - fieldnames [array1],
  1657.     field descriptions [array2]
  1658.     Pass both or none. Normally, field names
  1659.     are used as the column headings for the list, but
  1660.     if [array2] is passed, these descriptions are used
  1661.     in the column headings of corresponding fields.
  1662.     By default, all fields are used, field names are
  1663.     used for descriptions.
  1664.  Examples
  1665.     USE CUSTOMER
  1666.     private flds[3],fdes[3]
  1667.     afields(m->flds)
  1668.     fdes[1] = "First Name"
  1669.     fdes[2] = "Last Name"
  1670.     fdes[3] = "Middle Initial"
  1671.     LISTER(flds,fdes)
  1672.     ...
  1673.     or
  1674.     ...
  1675.     USE CUSTOMER
  1676.     LISTER()
  1677.  Notes
  1678.     Structure for database : PLIST.DBF
  1679.     Field  Field Name  Type        Width    Dec
  1680.     .    1  DESC    Character    45
  1681.     .    2  LIST        Character    200
  1682.     ** Total **    246
  1683.  File
  1684.     S_LIST.PRG
  1685.  
  1686. ---------------------------------------------------------------------
  1687. FUNCTION: LJUST()          Left justifies a string
  1688.  
  1689.     Left justifies a string
  1690.  Returns
  1691.     <expC> string left justified
  1692.  Category
  1693.     String
  1694.  Syntax
  1695.     LJUST(<expC>)
  1696.  Description
  1697.     Left justifies <expC>
  1698.  Examples
  1699.     string = "      Superfunction"
  1700.     string = LJUST(string)
  1701.     (returns "Superfunction    "
  1702.  File
  1703.     S_LJUST.PRG
  1704.  
  1705. ---------------------------------------------------------------------
  1706. FUNCTION: MAKEBOX()        Draws a shadow box on the screen, saves the screen
  1707.  
  1708.     Draws a shadow box on the screen, saves the screen
  1709.  Returns
  1710.     <expC> string containing underlying screen & colors
  1711.  Category
  1712.     Popup
  1713.  Syntax
  1714.     MAKEBOX(<expN1>,<expN2>,<expN3>,<expN4>,[expC],[expN5])
  1715.  Description
  1716.     Draws a box at screen coordinates <expN1..expN4>
  1717.     Returns a string containing the underlying screen
  1718.     and previous color. Box will explode or not based
  1719.     on the global variable C_XPLODE. 
  1720.  Options
  1721.     Default color is setcolor(). Default shadow position
  1722.     is the global var [c_shadpos]. These may be passed
  1723.     as options . Shadow position [expN5] has allowable
  1724.     values of (1,3,7,9,0) to match the corner positions on
  1725.     the numeric keypad. 0 is no shadow. [expC] is a valid
  1726.     color string or variable.
  1727.  Examples
  1728.     box = MAKEBOX(5,5,10,10)
  1729.     *draws a box at 5,5,10,10. Color is SETCOLOR().
  1730.     *shadow position is based on C_SHADPOS.
  1731.     box = MAKEBOX(5,5,10,10,C_POPCOL)
  1732.     *draws a box at 5,5,10,10. Color is C_POPCOL.
  1733.     *shadow position is based on C_SHADPOS.
  1734.     box = MAKEBOX(5,5,10,10,C_POPCOL,9)
  1735.     *draws a box at 5,5,10,10. Color is C_POPCOL.
  1736.     *shadow position is 9 (upper right hand corner)
  1737.  Notes
  1738.     UNBOX() removes the box and restores the
  1739.     underlying screen and prior colors.
  1740.  Warnings
  1741.     Use only UNBOX() to remove screens stored with
  1742.     MAKEBOX().
  1743.  File
  1744.     S_MAKEB.PRG
  1745.  
  1746. ---------------------------------------------------------------------
  1747. FUNCTION: MCHOICE()        Creates a box for an Achoice call
  1748.  
  1749.     Creates a box for an Achoice call
  1750.  Returns
  1751.     <expN> Achoice selection
  1752.  Category
  1753.     Popup
  1754.  Syntax
  1755.     MCHOICE(<expC1>|<array>,<expN1..4>,[expC2],[expL])
  1756.  Description
  1757.     Provides a box for an achoice on array
  1758.     <expC1>/<array> of dimensions <expN1..expN4>
  1759.     (top,left,bott,right)
  1760.  Options
  1761.     Title <expC2> i.e. "Select One"
  1762.     <expL> determines (yes or no) whether a return is
  1763.     to be executed on a first letter match.(default .f.)
  1764.  Examples
  1765.     declare MEALS[3]
  1766.     meals[1]= "Pizza"
  1767.     meals[2]= "Chicken"
  1768.     meals[3]= "Chinese"
  1769.     * box only, no title
  1770.     selection = MCHOICE(m->meals,10,10,15,25)
  1771.     *or box with title
  1772.     selection = ; MCHOICE("meals",10,10,15,25,"Pick-a-Meal")
  1773.     *or box with title, first letter match = return
  1774.     selection = ;
  1775.     MCHOICE(meals,10,10,15,25,"PickaMeal",.f.)
  1776.  Notes
  1777.     Bottom of window adjusts (shrinks) to adjust to
  1778.     array size.
  1779.  File
  1780.     S_MCHOI.PRG
  1781.  
  1782. ---------------------------------------------------------------------
  1783. FUNCTION: MENU_V()         Vertical popup menu from variable # parameters
  1784.  
  1785.     Vertical popup menu from variable # parameters
  1786.  Returns
  1787.     <expN> selection - 0 for no selection
  1788.  Category
  1789.     Menu
  1790.  Syntax
  1791.     MENU_V(<expC1>,<expC2>,<expC3>,...<expC16>)
  1792.  Description
  1793.     Creates a popup vertical menu in a centered
  1794.     box, using <expC1> as the title, and performing
  1795.     a menu to on <expC1...expC16> (variable #)
  1796.     <expC1> may be passed as "" for no title.
  1797.  Examples
  1798.     choice = ; menu_v("Selection","Edit","Add","Quit")
  1799.          -or-
  1800.     choice =menu_v("","Edit","Add","Quit")
  1801.  Warnings
  1802.     A MENU TO is performed which tends to blow
  1803.     active gets. Be careful if doing this during
  1804.     a READ.
  1805.  File
  1806.     S_MENUV.PRG
  1807.  
  1808. ---------------------------------------------------------------------
  1809. FUNCTION: MESSYN()         Popup YesNo prompt box
  1810.  
  1811.     Popup YesNo prompt box
  1812.  Returns
  1813.     <expL> True for yes, False for No
  1814.  Category
  1815.     Popup
  1816.  Syntax
  1817.     MESSYN(<expC1>,[expN1],[expN2],[expC2],[expC3])
  1818.  Description
  1819.     Pops up a box and displays a question <expC1>
  1820.     and two prompts.
  1821.  Options
  1822.     [expN1] and [expN2] are optional box top and left
  1823.     coordinates. Default is centered. [expC2] ,[expC3]
  1824.     are optional prompts 1 and 2. Default is YES/NO.
  1825.     The options can be given in any of the following
  1826.     arrangements:
  1827.     [expN1],[expN2],[expC2],[expC3]
  1828.     [expC2],[expC3],[expN1],[expN2]
  1829.     [expC2],[expC3]
  1830.     [expN1],[expN2]
  1831.  Examples
  1832.     if messyn("Are you done")
  1833.     if messyn("Are you done",10,10)
  1834.     if messyn("Are you done",10,10,"Not;                    yet","Almost")
  1835.     if messyn("Are you done","Not ;                     yet","Almost",10,10)
  1836.     if messyn("Are you done","Not ;                     Yet","Almost")
  1837.  File
  1838.     S_MESSYN.PRG
  1839.  
  1840. ---------------------------------------------------------------------
  1841. FUNCTION: MFIELDS()        Pops up an achoice for current dbf fields
  1842.  
  1843.     Pops up an achoice for current dbf fields
  1844.  Returns
  1845.     <expC> field name or "" if none selected
  1846.  Category
  1847.     Popup
  1848.  Syntax
  1849.     <expC> = Mfields([expC],[expN1..expN4])
  1850.  Description
  1851.     Popus up a box and presents an achoice() for the
  1852.     current dbf fields.
  1853.  Options
  1854.     [expC] title for box. [expN1..expN4]  coordinates
  1855.     of the box. Default is centered.
  1856.  Examples
  1857.     fieldname = MFIELDS()
  1858.     *or
  1859.     fieldname = MFIELDS("Pick a Field")
  1860.     *or
  1861.     fieldname = MFIELDS('Pick a Field',10,10,20,40)
  1862.  File
  1863.     S_MFLD.PRG
  1864.  
  1865. ---------------------------------------------------------------------
  1866. FUNCTION: MODIFY()         Create or modify DBF structures
  1867.  
  1868.     Create or modify DBF structures
  1869.  Returns
  1870.     <expC> name of datafile created/modified
  1871.  Category
  1872.     Metafunction
  1873.  Syntax
  1874.     MODIFY()
  1875.  Description
  1876.     dBase-like MODI STRU for creating/modifying
  1877.     DBFs.
  1878.  Examples
  1879.     MODIFY()
  1880.  Warnings
  1881.     NOT A NETWORK FUNCTION - DO NOT USE ON A NETWORK
  1882.  File
  1883.     S_MODIFY.PRG
  1884.  
  1885. ---------------------------------------------------------------------
  1886. FUNCTION: MSG()            Displays up to a 9 line message in a window
  1887.  
  1888.     Displays up to a 9 line message in a window
  1889.  Returns
  1890.     Nothing
  1891.  Category
  1892.     Popup
  1893.  Syntax
  1894.     Up to 9 character strings as lines in the message .
  1895.  Description
  1896.     Displays in a popup box up to 9 lines of a message.
  1897.     Then waits for a keypress or optionally a time-out.
  1898.  Options
  1899.     First parameter can be a number equalling a time-out
  1900.     value in seconds
  1901.  Examples
  1902.     MSG("An error has been detected",;
  1903.         "...don't move!")
  1904.     MSG("A","B","C","D","E","F")
  1905.     MSG(5,"A","B","C","D","E","F")
  1906.  Notes
  1907.     Message is centered on screen in a box
  1908.     Once message is displayed, waits for keypress and
  1909.     then removes window, restoring screen underneath.
  1910.     Or waits for time-out value.
  1911.  File
  1912.     S_MSG.PRG
  1913.  
  1914. ---------------------------------------------------------------------
  1915. FUNCTION: NBR2STR()        Correctly orders numerics where negative
  1916.  
  1917.     Correctly orders numerics where negative
  1918.  Returns
  1919.     String
  1920.  Category
  1921.     Conversion
  1922.  Syntax
  1923.     <expC> = NBR2STR(<expN>)
  1924.  Description
  1925.     Ensure numeric fields are correctly ordered
  1926.     when converting to type character and
  1927.     when taking negatives into account.
  1928.     This is done by attaching CR, DB or CZ
  1929.     to the end of the number to overcome the
  1930.     placement of (-+) in the ASCII scale.
  1931.  Examples
  1932.     index on LASTNAME+NBR2STR(amount_due) to ;          NEWINDEX
  1933.  File
  1934.     S_NBR2ST.PRG
  1935.  
  1936. ---------------------------------------------------------------------
  1937. FUNCTION: NKEY()           Gets key of an index file
  1938.  
  1939.     Gets key of an index file
  1940.  Returns
  1941.     <expC> index key expression
  1942.  Category
  1943.     File
  1944.  Syntax
  1945.     NKEY(<expC>)
  1946.  Description
  1947.     Gets key expression of index <expC>. <expC> is
  1948.     the name of the index including extension. The
  1949.     function operates differently from .ntx to .ndx.
  1950.  Examples
  1951.     ndxknt = adir("*.ndx")
  1952.     declare ind[ndxknt]
  1953.     adir(ind,"*.ndx")
  1954.     for i = 1 to ndxknt
  1955.         ?"Key for index: "+ind[i]+" is;               "+NKEY(ind[i])
  1956.     next
  1957.  Notes
  1958.     NKEY() expects the full path of the index file
  1959.     and if no path is passed, will use SET DEFAULT
  1960.     setting
  1961.  Warnings
  1962.     Uses up a file handle temporarily.
  1963.  File
  1964.     S_NKEY.PRG
  1965.  
  1966. ---------------------------------------------------------------------
  1967. FUNCTION: NOZDIV()         Prevents divide-by-zero
  1968.  
  1969.     Prevents divide-by-zero
  1970.  Returns
  1971.     <expN>
  1972.  Category
  1973.     Conversion
  1974.  Syntax
  1975.     NOZDIV(<expN>)
  1976.  Description
  1977.     Prevents divide-by-zero by converting a number to
  1978.     1 if it is zero, otherwise leaving it as-is.
  1979.  Examples
  1980.     x = 5
  1981.     y = 0
  1982.     z = x/NOZDIV(y)
  1983.  File
  1984.     S_NOZDIV.PRG
  1985.  
  1986. ---------------------------------------------------------------------
  1987. FUNCTION: ONE_READ()       Pop-up window with 1-4 Say/Get combinations
  1988.  
  1989.     Pop-up window with 1-4 Say/Get combinations
  1990.  Returns
  1991.     nothing
  1992.  Category
  1993.     Popup
  1994.  Syntax
  1995.     ONE_READ(<expC1>,<expC2>,<expC3>,...)
  1996.  Description
  1997.     For 1-4 iterations of <expC1..expC3>, a popup
  1998.     window will display a Say <expC1>, do a Get on
  1999.     the variable named in <expC2> with a Picture
  2000.     of <expC3>. A read will then be issued.
  2001.  Examples
  2002.     c_date = date()
  2003.     c_time = space(8)
  2004.     fun  = .t.
  2005.     ONE_READ("Current Date","C_DATE","@D",;
  2006.         "Current Time","C_TIME","99:99:99",;
  2007.         "Having Fun ?","FUN","Y")
  2008.  Notes
  2009.     What I've since realised is that <expC2> should
  2010.     actually be passed by reference (@). This would
  2011.     cut down on all the macro-expansionitis.
  2012.     ASSUMES GET VARIABLES HAVE BEEN INITIALIZED IN CALLING PROGRAM
  2013.     Mainly here for compatibility with older versions
  2014.     See POPREAD() for a better implementation.
  2015.  File
  2016.     S_ONER.PRG
  2017.  
  2018. ---------------------------------------------------------------------
  2019. FUNCTION: OPENIND()        Opens an array of indexes
  2020.  
  2021.     Opens an array of indexes
  2022.  Returns
  2023.     Nothing
  2024.  Category
  2025.     DBF
  2026.  Syntax
  2027.     OPENIND(<array>)
  2028.  Description
  2029.     Opens up the indexes named in <array>
  2030.  Examples
  2031.     declare indx[3]
  2032.     indx[1] = "CUSTOMER"
  2033.     indx[2] = "PRODUCT"
  2034.     indx[3] = "PAYDATE"
  2035.     OPENIND(m->indx)
  2036.  File
  2037.     S_OPENIN.PRG
  2038.  
  2039. ---------------------------------------------------------------------
  2040. FUNCTION: P_READY()        Determines if printer is ready, prompts user
  2041.  
  2042.     Determines if printer is ready, prompts user
  2043.  Returns
  2044.     <expL> True if printer is ready
  2045.  Category
  2046.     Popup
  2047.  Syntax
  2048.     if p_ready([expC])
  2049.  Description
  2050.     Checks for printer ready, and prompts user to
  2051.     ready the printer until it is ready, or until
  2052.     user presses escape to abort printing.
  2053.     p_ready() first looks at _CHECKPRN, and if the
  2054.     value is .f., does no printer check and returns
  2055.     .t.
  2056.  Options
  2057.     [expc] - LPT1 LPT2 LPT3
  2058.     Default is LPT1
  2059.  Examples
  2060.     if P_READY("LPT2")
  2061.       REPORT FORM yayaya TO PRINT
  2062.     ENDIF
  2063.  Notes
  2064.     The variable _CHECKPRN is initalized as a
  2065.     PUBLIC to .T. by INITSUP(). If on a network
  2066.     and using redirected printers, set this to
  2067.     .F. after first call to INITSUP().
  2068.     i.e.  INITSUP()
  2069.         _CHECKPRN = .F.
  2070.  File
  2071.     S_PREAD.PRG
  2072.  
  2073. ---------------------------------------------------------------------
  2074. FUNCTION: PICKNDX()        Allows user to select indexes to open
  2075.  
  2076.     Allows user to select indexes to open
  2077.  Returns
  2078.     # of indexes selected
  2079.  Category
  2080.     DBF
  2081.  Syntax
  2082.     PICKNDX(<expA>)
  2083.  Description
  2084.     Allows the user to point and shoot index
  2085.     selection.
  2086.     [expA] is an array to fill with index names,
  2087.     initialized to the max # of indexes to open
  2088.  Examples
  2089.     declare INDIES[10]
  2090.     nbrpicked = pickndx(indies)
  2091.  File
  2092.     S_PICKND.PRG
  2093.  
  2094. ---------------------------------------------------------------------
  2095. FUNCTION: PLSWAIT()        Pops up a 'Please Wait' window or removes it
  2096.  
  2097.     Pops up a 'Please Wait' window or removes it
  2098.  Returns
  2099.     nothing
  2100.  Category
  2101.     Popup
  2102.  Syntax
  2103.     PLSWAIT(<expL>,[expC],[expN1..expN4])
  2104.  Description
  2105.     Pops up a window with a 'please wait' message
  2106.     or removes a previous 'please wait' window.
  2107.     <expL> True = popup window. <expL> False means
  2108.     remove window.
  2109.  Options
  2110.     [expC] - message. Default is 'Please wait...'
  2111.     [expN1..expN4] box coordinates. Defaults are
  2112.     10,20,12,60 (top,left,bottom,right)
  2113.  Examples
  2114.     PLSWAIT(.T.,"I'm thinking...")
  2115.     ...code...
  2116.     ...code...
  2117.     ...code...
  2118.     PLSWAIT(.F.)
  2119.  Notes
  2120.     Makes public the variables :
  2121.     pls_top,pls_left,pls_bot,pls_right,pl_wait
  2122.     And releases them when called with .f.
  2123.  File
  2124.     S_PLSW.PRG
  2125.  
  2126. ---------------------------------------------------------------------
  2127. FUNCTION: POPEX()          Pops up an achoice for a certain filespec
  2128.  
  2129.     Pops up an achoice for a certain filespec
  2130.  Returns
  2131.     <expC> file name or "" for none
  2132.     If a path is specified, a path will also be
  2133.     returned.
  2134.  Category
  2135.     Popup
  2136.  Syntax
  2137.     <expC> = Popex(<expC>,[expC])
  2138.  Description
  2139.     Pops up a picklist for all files matching the
  2140.     skeleton given as <expC>. i.e. "*.dbf"
  2141.  Options
  2142.     Optional title string - displays at top of box
  2143.  Examples
  2144.     opendbf = POPEX("*.DBF")
  2145.         => will return DBF name
  2146.     opendbf = POPEX("C:\FILES\*.DBF")
  2147.         => will return "C:\FILES\" plus DBF name
  2148.  File
  2149.     S_POPEX.PRG
  2150.  
  2151. ---------------------------------------------------------------------
  2152. FUNCTION: POPREAD()        Pops up a box with 1-5 say-get combinations
  2153.  
  2154.     Pops up a box with 1-5 say-get combinations
  2155.  Returns
  2156.     nothing
  2157.  Category
  2158.     Popup
  2159.  Syntax
  2160.     POPREAD(<expL>,[expN1,expN2,expC1],;
  2161.         <expC1>,<@exp>,<expC2>,..)
  2162.  Description
  2163.     [expL]     .t. = GETS are displayed below SAYS,
  2164.             .f. = GETS are displayed beside SAYS                 (default)
  2165.     [next 3 params may be option params - see below]
  2166.     For 1-5 iterations of <expC1..expC3>, a popup
  2167.     window will display a Say <expC1>, do a Get on
  2168.     the variable passed by reference in <@exp> with
  2169.     a Picture of <expC3>. A read will then be issued.
  2170.  Options
  2171.     If params 2,3 and 4 are passed as Numeric/Numeric/Chr then they are evaluated as the top,left and color
  2172.     for the popup box.
  2173.     [expN1]    = top
  2174.     [expN2]    = left
  2175.     [expC3]    = color string
  2176.  Notes
  2177.     This is an intelligent version of ONE_READ. 2nd
  2178.     param is passed by reference rather than by
  2179.     name - cutting down DRASTICALLY on the macro
  2180.     expansion and greatly simplifying the code.
  2181.     To pass by reference, preface the parameter
  2182.     with @.
  2183.  Examples
  2184.     c_date = date() c_time = space(8) fun  = .t.
  2185.     POPREAD(.t.,"Current Date",@C_DATE,"@D",;
  2186.         "Current Time",@C_TIME,"99:99:99",;
  2187.         "Having Fun ?",@FUN,"Y")
  2188.  File
  2189.     S_POPR.PRG
  2190.  
  2191. ---------------------------------------------------------------------
  2192. FUNCTION: PRNPORT()        Determine Printer Port to use
  2193.  
  2194.     Determine Printer Port to use
  2195.  Returns
  2196.     <expC> port chosen
  2197.  Category
  2198.     Environment
  2199.  Syntax
  2200.     PRNPORT([expC1],[expC2]..[expC9])
  2201.  Description
  2202.     Allows user to select printer port for
  2203.     SET PRINTER TO output. Printer is set
  2204.     to this port
  2205.  Options
  2206.     [expC1-9] are valid SET PRINTER TO strings
  2207.     LPT1 LPT2 LPT3 COM1 COM2 COM3 COM4 <FILENAME>
  2208.  Examples
  2209.     theport = PRNPORT("LPT1","COM1")
  2210.  File
  2211.     S_PRNPOR.PRG
  2212.  
  2213. ---------------------------------------------------------------------
  2214. FUNCTION: PRNTFRML()       Prints a formletter created by formletr()
  2215.  
  2216.     Prints a formletter created by formletr()
  2217.  Returns
  2218.     nothing
  2219.  Category
  2220.     Other
  2221.  Syntax
  2222.     PRNTFRML(<expC>,<expN>)
  2223.  Description
  2224.     Prints the form <expC> from FORMS.DBF with a
  2225.     pagewidth of <expN>.
  2226.  Examples
  2227.     This is used internally by FORMLETR() and
  2228.     FASTFORM(). Refer to its usage there.
  2229.  File
  2230.     S_PRNTF.PRG
  2231.  
  2232. ---------------------------------------------------------------------
  2233. FUNCTION: PROPER()         Capitalizes first letters of string, lowers rest
  2234.  
  2235.     Capitalizes first letters of string, lowers rest
  2236.  Returns
  2237.     <expC> string properized
  2238.  Category
  2239.     String
  2240.  Syntax
  2241.     PROPER(<expC>)
  2242.  Description
  2243.     Capitalizes all first letters of words in <expC>
  2244.     and converts the rest to lowercase
  2245.  Examples
  2246.     string = "SUPERFUNCTION library"
  2247.     string = PROPER(string)
  2248.     (returns "Superfunction Library"
  2249.  Notes
  2250.     There are cases where this just won't work - for
  2251.     instance I.B.M. would be converted to I.b.m.
  2252.  File
  2253.     S_PROPER.PRG
  2254.  
  2255. ---------------------------------------------------------------------
  2256. FUNCTION: PULLDN()         Pulldown menu creator, handler
  2257.  
  2258.     Pulldown menu creator, handler
  2259.  Returns
  2260.     A number in the form menu.prompt (i.e. 2.04)
  2261.  Category
  2262.     Menu
  2263.  Syntax
  2264.     <expN> = PULLDN(<expN>,<array1>,[array2],[array3])
  2265.  Description
  2266.     Draws a pulldown menu with up to 8 separate
  2267.     boxes. Selection process starts with <expN>.
  2268.     Each element of <array1> defines a menu.
  2269.     A menu definition is a delimited string in the
  2270.     form "TITLE:prompt:prompt:prompt" with up to 99
  2271.     prompts per string.
  2272.  Options
  2273.     [array2] is a box definition array. It is 7
  2274.     elements long and defines the following:
  2275.     Element:    1. <expL> Draw top bar box? T/F
  2276.                 2. <expC> Top bar color
  2277.                 3. <expC> Menu Box color
  2278.                 4. <expC> Menu Box frame
  2279.                 5. <expN> Menu Box shadow position
  2280.                 (0,1,3,7,9)
  2281.                 6. <expN> Menu Box shadow attribute
  2282.                 7. <expN> Row to start menu bar
  2283.     [array3] is an array of title column positions
  2284.     to override the internal 'figerin algorithm.
  2285.  Examples
  2286.     declare box[6],bdata[7]
  2287.     box[1] = "Datafiles:Use Datafile"
  2288.     box[2] = "Indices:Select Indices:Index order"
  2289.     box[3] = "Editing:Replacement:Tabular Edit"
  2290.     box[4] = "Reporting:Build Query:Print Lists"
  2291.     box[5] = "Other:List file:Change Directory"
  2292.     box[6] = "Quit"
  2293.     sf_sel = 1.01
  2294.     *- define menu boxes
  2295.     bdata[1]= .t.   && draw the top bar box
  2296.     bdata[2]= 'W/B,GR/R,,,W/N' && top bar color
  2297.     bdata[3]= 'W/B,N/R,,,W/N'  && drop box color
  2298.     bdata[4]= m->single_frame   && drop box frame
  2299.     bdata[5]= 3 && drop box shadow position
  2300.     bdata[6]= 8 && drop box shadow attribute
  2301.     bdata[7]= 0 && row # of menu bar
  2302.     do while .t.
  2303.         sf_sel = PULLDN(sf_sel,box,bdata)
  2304.         do case
  2305.         CASE sf_sel = 0  && TRAP 0
  2306.             sf_sel = 1.01
  2307.         case sf_sel = 1
  2308.         case sf_sel = 2
  2309.         case sf_sel = 3
  2310.         case sf_sel = 4
  2311.         endcase
  2312.     enddo
  2313.  Notes
  2314.     First letter selection takes place on the following
  2315.     priority: next matching element first letter, next
  2316.     matching box title first letter.
  2317.     Passing a menu array element with title only will
  2318.     result in no menu box, with the title being
  2319.     the only selection and returning a selection
  2320.     value of <MENU>.1.
  2321.     (i.e. a 'Quit' box)
  2322.  Warnings
  2323.     It takes some work to start all options and
  2324.     titles with a first letter that is unique so that
  2325.     first letter selection may take place.
  2326.  File
  2327.     S_PULLDN.PRG
  2328.  
  2329. ---------------------------------------------------------------------
  2330. FUNCTION: PURGEM()         Deletes records
  2331.  
  2332.     Deletes records
  2333.  Returns
  2334.     nothing
  2335.  Category
  2336.     DBF
  2337.  Syntax
  2338.     PURGEM()
  2339.  Description
  2340.     Deletes records
  2341.     of the currently opened DBF.
  2342.  Examples
  2343.     if clean_em_up
  2344.         select 0
  2345.         use QUERIES
  2346.         PURGEM()
  2347.     endif
  2348.  Notes
  2349.     This is intended for those small system files
  2350.     created by QUERY(), FORMLETR(), LISTER() etc.
  2351.     No PACKING is done.
  2352.  File
  2353.     S_PURGEM.PRG
  2354.  
  2355. ---------------------------------------------------------------------
  2356. FUNCTION: QUERY()          Popup Interactive query by example condition builder
  2357.  
  2358.     Popup Interactive query by example condition builder
  2359.  Returns
  2360.     <expC> macro expandable logical condition expression
  2361.  Category
  2362.     Metafunction
  2363.  Syntax
  2364.     QUERY([array1...array3],[expC])
  2365.  Description
  2366.     A point and shoot condition builder. Complex
  2367.     conditions are allowed with multiple .and./.or.
  2368.     Called without parameters, all fields in the
  2369.     current dbf are presented for condition building.
  2370.  Options
  2371.     [array1],[array2],[array3] give field array,
  2372.     field description and field types.These, if passed
  2373.     will be used in place of the default of all dbf
  2374.     fields. (pass all or none)
  2375.     [expC] is a 'quit to' phrase.
  2376.     Default exit option is 'Quit'. 'Quit to' phrase
  2377.     will be tacked to the end of this . i.e.
  2378.     "Quit"+quit_to  [ Quit to Report Writer ]
  2379.  Examples
  2380.     USE CUSTOMER
  2381.     private flds[3],fdes[3],ftyp[3]
  2382.     flds[1] = "fname"
  2383.     flds[2] = "lname"
  2384.     flds[3] = "mi"
  2385.     fdes[1] = "First Name"
  2386.     fdes[2] = "Last Name"
  2387.     fdes[3] = "Middle Initial"
  2388.     ftyp[1] = "C"
  2389.     ftyp[2] = "C"
  2390.     ftyp[3] = "C"
  2391.     filt = QUERY(flds,fdes,ftyp)
  2392.     set filter to &filt
  2393.     ...
  2394.     or
  2395.     ...
  2396.     USE CUSTOMER
  2397.     looker = QUERY()
  2398.     locate for &looker
  2399.  Notes
  2400.     Uses public variable 'QUERY_EXP'. This contains the
  2401.     current query expression, which is retained between
  2402.     calls of query, and is looked for by other
  2403.     SUPER functions.
  2404.     Will call BUILDEX() (expression builder - Metafunction
  2405.     optional module) if it is loaded in memory.
  2406.     The way to load BUILDEX is to declare it external i.e.
  2407.     EXTERNAL BUILDEX
  2408.     Structure for database : QUERIES.DBF
  2409.     Field  Field Name      Type        Width    Dec
  2410.     .    1  DBF        Character    12
  2411.     .    2  DES        Character    30
  2412.     .    3  FQUERY    Character    220
  2413.  Warnings
  2414.     Macro expanding the QUERY_EXP variable lengthens the command line on which it is expanded. If the command line goes beyond 254 characters, the
  2415.     program will bomb. If this becomes a problem, use
  2416.     the function called EVALQ()
  2417.     in your expression and pass query_exp to it.
  2418.     Then use it like so:
  2419.     LOCATE FOR EVALQ(m->query_exp)
  2420.     In Clipper 5.01, you're better off doing
  2421.         queryblock := &("{||"+query_exp+"}")
  2422.         locate for eval(queryblock)
  2423.  File
  2424.     S_QUERY.PRG
  2425.  
  2426. ---------------------------------------------------------------------
  2427. FUNCTION: QUIKREPORT()     Runtime pre-defined report printing module
  2428.  
  2429.     Runtime pre-defined report printing module
  2430.  Returns
  2431.     Nothing
  2432.  Category
  2433.     REPORT
  2434.  Syntax
  2435.     QUIKREPORT([report name])
  2436.  Description
  2437.     Presents a piklist of pre-defined reports
  2438.     and prints the selected one.
  2439.  Options
  2440.     [report name] name of the report to run -
  2441.     piklist is bypassed.
  2442.  Examples
  2443.     QUIKREPORT('Quarterly Hog Count')
  2444.  Warnings
  2445.     Requires DBF and indexes to be open
  2446.  Notes
  2447.     See INITSUP() for description of using an
  2448.     alternate name to SFREPORT.DBF.
  2449.  File
  2450.     R_QUIKR.PRG
  2451.  
  2452. ---------------------------------------------------------------------
  2453. FUNCTION: REPORTER()       Create, modify, execute reports
  2454.  
  2455.     Create, modify, execute reports
  2456.  Returns
  2457.     Nothing
  2458.  Category
  2459.     REPORT
  2460.  Syntax
  2461.     REPORTER([array1],[array2],[array3])
  2462.  Description
  2463.     Build/modify reports based on fields
  2464.     in database.
  2465.  Options
  2466.     Fields in database may be specified in arrays 1-3
  2467.     which are 1. field names 2. field types
  2468.     3. field lengths.
  2469.  Examples
  2470.     example 1:
  2471.     Use Customer
  2472.     REPORTER()
  2473.     example 2:
  2474.     USE Customer
  2475.     private flds[3],ftyp[3],flen[3]
  2476.     flds[1] = "fname"
  2477.     flds[2] = "lname"
  2478.     flds[3] = "mi"
  2479.     ftyp[1] = "C"
  2480.     ftyp[2] = "C"
  2481.     ftyp[3] = "C"
  2482.     flen[1] = 15
  2483.     flen[2] = 25
  2484.     flen[3] = 1
  2485.     REPORTER(flds,ftyp,flen)
  2486.  Notes
  2487.     See INITSUP() for description of using an
  2488.     alternate name to SFREPORT.DBF.
  2489.  Found in (prgs)
  2490.     R_REPORT.PRG    main file
  2491.     R_PRINTR.PRG    print routines
  2492.     R_SAVE.PRG    report definition SAVE routine
  2493.     R_LOADR.PRG    report definition LOAD routine
  2494.     R_HDFOOT.PRG    header/footer editing routine
  2495.     R_BROWSE.PRG    column browse routine
  2496.     R_EDIT.PRG    column editing routines
  2497.     R_ORDER.PRG    grouping order routines
  2498.     R_LAYOUT.PRG    page layout routines
  2499.     R_MAKEDB.PRG    create sfreport.dbf
  2500.     Samples found in :
  2501.     SFREPORT.PRG    sample report front end
  2502.     SFREPORT.DB*    report definition datafiles -
  2503.                 created when needed
  2504.  Operation
  2505.     LOAD REPORT        load a pre-defined report                     into memory
  2506.     CREATE REPORT        create a blank slate for a                     new     report
  2507.     SAVE REPORT        save a defined report to                         sfreport.dbf
  2508.     EDIT REPORT        Insert, edit, delete report                     columns:
  2509.             Column Contents - may be a field,
  2510.                 spaces, or a complex expression
  2511.             Column Title - is freeform text entry of
  2512.                 the current column width and title
  2513.             Width - allows override of the default
  2514.                 column width determined by                     expression length or title width.
  2515.                 Values will be truncated or                     expanded to     match.
  2516.             Pict  - override default picture clause for
  2517.                 Numeric fields
  2518.             Total - is a Y/N for total on numeric fields
  2519.     DELETE REPORTS        Delete, pack                             obsolete reports
  2520.     HEADERS/FOOTERS      Define Header and                         Footer size and contents
  2521.     FILTERING            Select None, Query or                         Tagged
  2522.     GROUPING ORDER    Select from open index                         keys the major and
  2523.                     secondary grouping         OTHER OPTIONS
  2524.         Page length (lines per page)
  2525.         Page width (characters across)
  2526.         Top Margin (in lines)
  2527.         Left Margin (in characters)
  2528.         Text of Major Group (text to indicate a
  2529.             major group change)
  2530.         Text of Minor Group (text to indicate a
  2531.             minor group change)
  2532.         Major underline character (for underlining
  2533.             totals)
  2534.         Minor underline character (for underlining
  2535.             subtotals)
  2536.         Underline totals (yes or no)
  2537.         Eject before report (yes or no)
  2538.         Eject after report (yes or no)
  2539.         Eject on Major change (yes or no)
  2540.         Eject on Minor change (yes or no)
  2541.         Eject before Grand Totals (yes or no)
  2542.         Eject if # lines left (means eject if
  2543.             # or less lines remain on the page
  2544.             and a group change was just done)
  2545.         Pause between pages (yes or no)
  2546.         Number of title lines (1 or 2)
  2547.         Detail line separator (character)
  2548.         Depth of detail separator (line spacing 0 or 1)
  2549.         Column separator (character)
  2550.         Title/body/footer separator (character)
  2551.         Include standard 2-line header with page# and
  2552.             date (yes or no)
  2553.         Full or Summary Report (F/S)
  2554.         Printer setup code (decimal, like 1-2-3,
  2555.             i.e. 27,15 for compressed) to send
  2556.             before report
  2557.         Printer exit code to send after report
  2558.     PRINT REPORT    Allows PRINTER/DISK                         selection, start at page #                     (for recovery). While printing,                     SPACE will pause and ESCAPE                     will quit the report.
  2559.     QUIT        Exit report writer
  2560.  Structure for SFREPORT.DBF
  2561.     SF_DBF    Character    8    Dbf name
  2562.     SF_NDXKEY    Character    60    Sort key(index)
  2563.     SF_MAJKEY    Character    60    Major sort key
  2564.     SF_MINKEY    Character    60    Minor sort key
  2565.     SF_TITLE    Character    35    Report name
  2566.     SF_MAJTEXT    Character    25    Major key text
  2567.     SF_MINTEXT    Character    25    Minor key text
  2568.     SF_WIDTH    Numeric        3    Pg width chrs
  2569.     SF_LENGTH    Numeric        3    Pg length lines
  2570.     SF_LEFTM    Numeric        2    Left margin
  2571.     SF_TOPM    Numeric        2    Top margin
  2572.     SF_SPACE    Numeric        1    Line spacing
  2573.     SF_PAUSE    Logical        1    Pause between 
  2574.     SF_NPLINES  Numeric    1    Lines left 
  2575.     SF_EJB4    Logical        1    Eject b4 report
  2576.     SF_EJAFT    Logical        1    Eject aftreport
  2577.     SF_EJMAJOR  Logical    1    Eject on Major 
  2578.     SF_EJMINOR  Logical    1    Eject on Minor
  2579.     SF_EJGRAND  Logical    1    Eject b4 Grand 
  2580.     SF_UNTOTAL  Logical    1    Underline ttals
  2581.     SF_MAJCHR    Character    1    Major underline                         character
  2582.     SF_MINCHR    Character    1    Minor underline                         character
  2583.     SF_NHEAD    Numeric        1    # header lines
  2584.     SF_NFOOT    Numeric        1    # footer lines
  2585.     SF_NTITL    Numeric        1    # title lines     
  2586.     SF_TSEP    Character    1    Title                                 separation char
  2587.     SF_COLSEP    Character    1    Col sep char
  2588.     SF_CSEPWID  Numeric    1    Col sep width
  2589.     SF_LINESEP    Character    1    Line sep char    
  2590.     SF_NCOLS    Numeric        2    # columns 
  2591.     SF_FEET    Memo        10    Footer contents 
  2592.     SF_HEADS    Memo        10    Header contents 
  2593.     SF_STDHEAD  Logical    1    Use standard                             header
  2594.     SF_DETAILS  Memo        10    Detail contents 
  2595.     SF_QUERY    Character    100    Last used query
  2596.     SF_FULLSUM    Character    1    Full / summary 
  2597.     SF_PRNCODE    Character    50    Printer code                             pre-report
  2598.     SF_AFTCODE    Character    50    Printer code                             post-report
  2599.  
  2600. ---------------------------------------------------------------------
  2601. FUNCTION: RJUST()          Right justifies a string
  2602.  
  2603.     Right justifies a string
  2604.  Returns
  2605.     <expC> string right justified
  2606.  Category
  2607.     String
  2608.  Syntax
  2609.     RJUST(<expC>)
  2610.  Description
  2611.     Right justifies <expC>
  2612.  Examples
  2613.     string = "Superfunction "
  2614.     string = RJUST(string)
  2615.     (returns "  Superfunction"
  2616.  File
  2617.     S_RJUST.PRG
  2618.  
  2619. ---------------------------------------------------------------------
  2620. FUNCTION: SADD_REC()       Attempts to append a blank record
  2621.  
  2622.     Attempts to append a blank record
  2623.  Returns
  2624.     <expL> success
  2625.  Category
  2626.     NETWORK
  2627.  Syntax
  2628.     SADD_REC(<expN>,<expL>,<expC>)
  2629.  Description
  2630.     Attempts to append a blank record.
  2631.     Tries <expN> times and then allows user to
  2632.     retry or not <expL2> by giving message <expC3>
  2633.     and asking YES/NO.
  2634.  Examples
  2635.     IF SADD_REC(5,.T.,"Unable to ADD,Try again?")
  2636.         IF SREC_LOCK(5,.T.,"Unable to lock, Try;                        again?")
  2637.         REPLACE XXX WITH YYY, ZZZ WITH BBB
  2638.         UNLOCK
  2639.         ELSE
  2640.         LOOP
  2641.         ENDIF
  2642.     ELSE
  2643.         LOOP
  2644.     ENDIF
  2645.  File
  2646.     S_SADDR.PRG
  2647.  
  2648. ---------------------------------------------------------------------
  2649. FUNCTION: SCMOD()          Maintains scroller.dbf - see scroller()
  2650.  
  2651.     Maintains scroller.dbf - see scroller()
  2652.  Returns
  2653.     nothing
  2654.  Category
  2655.     Development
  2656.  Syntax
  2657.     SET KEY xxx to SCMOD
  2658.  Description
  2659.     SCMOD() is a tool for online building and
  2660.     modifying of the SCROLLER.DBF used for
  2661.     SCROLLER() lookup tables.
  2662.     When called by a SET KEY, it recieves the
  2663.     PROCEDURE and VARIABLE parameters from the
  2664.     calling PROCEDURE. It then determines if there
  2665.     exists a matching record in the SCROLLER.DBF.
  2666.     If so, the lookup definition may be modified.
  2667.     Otherwise, a new lookup definition may be created.
  2668.  Examples
  2669.     EXTERNAL SCMOD
  2670.     SET KEY -31 TO SCMOD  && ALT-F2
  2671.  Notes
  2672.     Be sure to declare SCMOD external.
  2673.     SCROLLER.DBF has the structure :
  2674.      calling procedure..    1  SMODULE    C  10
  2675.      calling variable....    2  SFIELD    C  10
  2676.      description........    3  SDESCR    C  25
  2677.      display string.....    4  SSTRING    C  160
  2678.      return string.....    5  SRETURN    C  75
  2679.      dbf file to lookup..    6  SDBFILE    C  8
  2680.      index to use.....     7  SIND        C  8
  2681.     SCMOD() will create SCROLLER.DBF if it doesn't exist.
  2682.  File
  2683.     S_SCMOD.PRG
  2684.  
  2685. ---------------------------------------------------------------------
  2686. FUNCTION: SCROLLER()       Hotkey lookup tables with dbf storage
  2687.  
  2688.     Hotkey lookup tables with dbf storage
  2689.  Returns
  2690.     nothing
  2691.  Category
  2692.     Lookup
  2693.  Syntax
  2694.     SET KEY xxx TO SCROLLER
  2695.     Scroller([expC1],[expN],[expC2])
  2696.  Description
  2697.     Scroller is a hotkey lookup table engine.
  2698.     Scroller is data-driven , meaning it operates on data stored external to the EXE in SCROLLER.DBF. 
  2699.     SCROLLER() is called via a SET KEY. When called, it recieves the parameters proc_nam and VARIABLE from Clipper, tellingit the proc and variable the user was sitting on when he pressed the hotkey. The actual parameters rec'd areproc_nam, LINE, VARIABLE. Line is ignored, but it s included as the 2nd parameter because it is passed. 
  2700.     SCROLLER() attemps to find a corresponding record in SCROLLER.DBF (which contains fields for proc_nam and VARIABLE). SCROLLER.DBF is a storage place for lookup definitions.  If SCROLLER does not find a matching record, it simply closes SCROLLER.DBF and returns to the previous area. It then displays a 'lookup table not found' message.
  2701.     If SCROLLER finds a matching record, it loads the
  2702.     values into memory and closes SCROLLER.DBF. It then opens the DBF [and index] of the lookup dbf in
  2703.     the next available area. If it is unable to open
  2704.     the dbf, it displays an error message and goes back
  2705.     to the previously selected area.
  2706.     SCROLLER then draws a box, using the DESCRIPTION field as the title, ititializes a 1 element array composed of the SSTRING expression and calls
  2707.     SMALLS() . 
  2708.     While in the SMALLS(), first letter searches can be done if the dbf is indexed with a character index. Pressing ENTER will KEYBOARD the expression in SRETURN (unless its empty), close up the current area and return to the old area. Pressing escape just closes things up and returns to the old area.
  2709.     The KEYBOARD then takes over, feeding the SRETURN expression into the keyboard and into the current GET or GETS.
  2710.  Examples
  2711.     EXTERNAL SCROLLER
  2712.     SET KEY -1 TO SCROLLER  && F2
  2713.     ..or
  2714.  Warnings
  2715.     Be sure to declare SCROLLER EXTERNAL!
  2716.  File
  2717.     S_SCROLL.PRG
  2718.  
  2719. ---------------------------------------------------------------------
  2720. FUNCTION: SEARCHME()       Search a DBF with user-specified criteria
  2721.  
  2722.     Search a DBF with user-specified criteria
  2723.  Returns
  2724.     Nothing
  2725.  Category
  2726.     Metafunction
  2727.  Syntax
  2728.     SEARCHME([array1],[array2],[array3])
  2729.  Description
  2730.     Searches the current dbf with criteria given
  2731.     by the user.
  2732.         for :     Field Contents Match
  2733.             Query match
  2734.             End of file
  2735.             Beginning of File
  2736.             Deleted Records
  2737.             Memo contents
  2738.  Options
  2739.     Three arrays may be passed for FIELDS <array1>,
  2740.     FIELD TYPES <array2>, and FIELD LENGTHS <array3>.
  2741.  Examples
  2742.     if choice = 5
  2743.         SEARCHME()
  2744.     endif
  2745.  File
  2746.     S_SEARCH.PRG
  2747.  
  2748. ---------------------------------------------------------------------
  2749. FUNCTION: SETCENT()        Determines if century is on/off
  2750.  
  2751.     Determines if century is on/off
  2752.  Returns
  2753.     <expL> on/off
  2754.  Category
  2755.     Date
  2756.  Syntax
  2757.     <expL> = SETCENT([expL])
  2758.  Description
  2759.     Returns current SET CENTURY setting and
  2760.     optionally sets century on/off [expL]
  2761.  Options
  2762.     [expL] .t. = ON .f. = OFF
  2763.  Examples
  2764.     oldcentury = SETCENT(.f.) && SET CENTURY OFF
  2765.     * code
  2766.     SETCENT(oldcentury)
  2767.  File
  2768.     S_SETCEN.PRG
  2769.  
  2770. ---------------------------------------------------------------------
  2771. FUNCTION: SETCOLORS()      Interactive color setting interface
  2772.  
  2773.     Interactive color setting interface
  2774.  Returns
  2775.     nothing
  2776.  Category
  2777.     Development
  2778.  Syntax
  2779.     SETCOLORS()
  2780.  Description
  2781.     This is a development tool for finding nice
  2782.     combinations of colors for the global superfunction
  2783.     colors. I would not give this to an end user, as
  2784.     it is just TOO MANY CHOICES!
  2785.     I normally select 10-15 nice combinations of the
  2786.     colors and give the user a selection of those,
  2787.     giving them such names as 'Hawaiian Blue' or
  2788.     'Royal Red'.
  2789.     First, a word on the Superfunction color scheme:
  2790.     This is not the perfect color scheme. It is the one
  2791.     on which this library runs. (hey - I hadda pick
  2792.     something) I also realize full well that color
  2793.     selection is more art than it is technical, and
  2794.     it is difficult to get two people to agree on a
  2795.     color scheme.
  2796.     Several global (public) color variables are used by
  2797.     the functions. These are:
  2798.     c_normcol    -  For normal input/output
  2799.     c_normmenu  -  For normal 'menu to' operations
  2800.     c_popcol    -  For popup box colors
  2801.     c_popmenu    -  For popup box menus
  2802.     c_frame    -  Frame string 
  2803.     c_shadatt    -  Shadow color attribute (numeric)
  2804.     c_shadpos    -  Shadow position (0,1,3,7,9)
  2805.     c_xplode    -  Logical - explode windows?
  2806.     All are of the format "f/b,f/b,,,f/b"
  2807.     (f-foreground b-background)
  2808.     The function INITSUP() will initialise
  2809.     these colors SETCOLORS() allows interactive setting of these colors. The variables are stored in COLORS.MEM - which is
  2810.     created if needed by SETCOLORS().
  2811.     If COLORS.MEM is not present, INITSUP() will
  2812.     initialise a default set of colors, otherwise it
  2813.     will restore from colors.mem
  2814.  Examples
  2815.     SETCOLORS()
  2816.     * then initialize the colors
  2817.     restore from colors.mem addit
  2818.     * then set the colors
  2819.     SET COLOR TO (C_normcol)
  2820.  Notes
  2821.     SETCOLORS() does not effect the current color
  2822.     setting. It manipulates COLORS.MEM. To utilize
  2823.     colors selected by SETCOLORS(), a restore from
  2824.     COLORS.MEM must be done.
  2825.     See also COLPIK()
  2826.     See also INITSUP()
  2827.     See also Appendix C
  2828.  Warnings
  2829.     I've had problems with old copies of COLORS.MEM
  2830.     (from previous versions) and also with COLORS.MEM
  2831.     created by other programs. If you run into
  2832.     troubles, try erasing COLORS.MEM.
  2833.  File
  2834.     S_SETCOL.PRG
  2835.  
  2836. ---------------------------------------------------------------------
  2837. FUNCTION: SET_DATE()       Sets and restores date format
  2838.  
  2839.     Sets and restores date format
  2840.  Returns
  2841.     <expN> previous SET DATE format 1-5
  2842.  Category
  2843.     Date
  2844.  Syntax
  2845.     <expN> = SET_DATE([expN])
  2846.  Description
  2847.     Return current SET DATE setting <expN> and
  2848.     optionally set to new format [expN]
  2849.  Options
  2850.     [expN] =      1  American
  2851.             2  British/French
  2852.             3  German
  2853.             4  ANSI
  2854.             5  Italian
  2855.  Examples
  2856.     oldformat = SET_DATE(5)
  2857.     ** SET TO ITALIAN
  2858.     * code
  2859.     * more code
  2860.     SET_DATE(oldformat) && restore to prior setting
  2861.  File
  2862.     S_SETDAT.PRG
  2863.  
  2864. ---------------------------------------------------------------------
  2865. FUNCTION: SETEXACT()       Determines if exact is on/off
  2866.  
  2867.     Determines if exact is on/off
  2868.  Returns
  2869.     <expL> on/off
  2870.  Category
  2871.     Date
  2872.  Syntax
  2873.     <expL> = SETEXACT([expL])
  2874.  Description
  2875.     Returns current SET EXACT setting and
  2876.     optionally sets century on/off [expL]
  2877.  Options
  2878.     [expL] .t. = ON .f. = OFF
  2879.  Examples
  2880.     oldexact = SETEXACT(.f.) && SET EXACT OFF
  2881.     * code
  2882.     SETEXACT(oldexact)
  2883.  File
  2884.     S_SETEX.PRG
  2885.  
  2886.  
  2887. ---------------------------------------------------------------------
  2888. FUNCTION: SFIL_LOCK()      Attempts to lock a file
  2889.  
  2890.     Attempts to lock a file
  2891.  Returns
  2892.     <expL> success
  2893.  Category
  2894.     NETWORK
  2895.  Syntax
  2896.     SFIL_LOCK(<expN>,<expL>,<expC>)
  2897.  Description
  2898.     Attempts to lock entire DBF file.
  2899.     Tries <expN> times and then allows user to
  2900.     retry or not <expL2> by giving message <expC3>
  2901.     and asking YES/NO.
  2902.  Examples
  2903.     IF SFIL_LOCK(5,.F.)
  2904.         PACK
  2905.         UNLOCK
  2906.     ELSE
  2907.         LOOP
  2908.     ENDIF
  2909.  File
  2910.     S_SFILOK.PRG
  2911.  
  2912. ---------------------------------------------------------------------
  2913. FUNCTION: SMALLS()         Lookup tables on dbf - no call to dbedit <small>
  2914.  
  2915.     Lookup tables on dbf - no call to dbedit <small>
  2916.  Returns
  2917.     nothing
  2918.  Category
  2919.     Lookup
  2920.  Syntax
  2921.     Smalls(expC,[expC],[expC/N],[expC],;
  2922.              [expC/N],[expCN)
  2923.  Description
  2924.     This is a next generation lookup engine, and is
  2925.     the Son of Scroller(). (smalls = small scroller)
  2926.     and is actually called by SCROLLER()
  2927.     It is called directly as follows:
  2928.     1. ExpC        the display string for the
  2929.                 lookup box.
  2930.  Options
  2931.     2. ExpC        a title for the lookup box
  2932.     3. ExpC/ExpN      A. alias name    or
  2933.                 B. numeric work area    or
  2934.                 C. dbf/ndx in the format:
  2935.                   "%dbfname%ndxname"
  2936.     4. ExpC        expression to keyboard if                     ENTER pressed
  2937.     5. ExpC/N        numeric- starting record
  2938.                 character - starting key
  2939.                 (only if indexed)
  2940.     6. ExpC/N        numeric    - ending record
  2941.                 character - ending key
  2942.                 (only if indexed)
  2943.  Examples
  2944.     (assumes dbf fields of LNAME and FNAME)
  2945.     * lookup on "LNAME+' '+FNAME" in current area
  2946.     smalls("LNAME+' '+FNAME")
  2947.     ...or
  2948.     * lookup on "LNAME+' '+FNAME" in current area
  2949.     * use "Name" as box title
  2950.     smalls("LNAME+' '+FNAME","Name")
  2951.     ...or
  2952.     * lookup on "LNAME+' '+FNAME" in current area
  2953.     * use "Name" as box title
  2954.     * go to area 5 for the lookup
  2955.     * send LNAME to the keyboard if CR pressed
  2956.     smalls("LNAME+''+FNAME","Name",5,"LNAME")
  2957.     ...or
  2958.     * lookup on "LNAME+' '+FNAME" in current area
  2959.     * use "Name" as box title
  2960.     * go to alias CUSTOMER for the lookup
  2961.     smalls("LNAME+''+FNAME","Name","CUSTOMER")
  2962.     ...or
  2963.     * open customer.dbf and do a lookup on it
  2964.     * lookup on "LNAME+' '+FNAME"
  2965.     * use "Name" as box title
  2966.     smalls("LNAME+''+FNAME","Name","%CUSTOMER")
  2967.     * open customer.dbf and do a lookup on it
  2968.     * lookup on "LNAME+' '+FNAME"
  2969.     * use "Name" as box title
  2970.     * limit lookup to between records 50 and 60
  2971.     smalls("LNAME+''+FNAME","Name","%CUSTOMER",50,60)
  2972.     * open CUSTOMER.DBF with LNAME.NDX and do a lookup
  2973.     * lookup on "LNAME+' '+FNAME"
  2974.     * use "Name" as box title
  2975.     smalls("LNAME+''+FNAME","Name","%CUSTOMER%LNAME")
  2976.     * open CUSTOMER.DBF with LNAME.NDX and do a lookup
  2977.     * lookup on "LNAME+' '+FNAME"
  2978.     * use "Name" as box title
  2979.     * limit lookup to JAAAA-ZZZZZ
  2980.     smalls("LNAME+''+FNAME","Name","%CUSTOMER%LNAME",;
  2981.         "JAAAAA","ZZZZZ")
  2982.  Notes
  2983.     The display string must evaluate to a character
  2984.     expression when macro-expanded. For instance, a
  2985.     date field called CDATE would crash if passed as
  2986.     smalls("CDATE"), as it would evaluate to date type,
  2987.     but if passed as smalls("dtoc(CDATE)" all would be
  2988.     well.
  2989.     The KEYBOARD expression must also evaluate to
  2990.     type CHARACTER
  2991.  Warnings
  2992.     SOFTSEEK is left OFF
  2993.  File
  2994.     S_SMAL.PRG
  2995.  
  2996. ---------------------------------------------------------------------
  2997. FUNCTION: SNET_USE()       Attempts to  pen a DBF
  2998.  
  2999.     Attempts to  pen a DBF
  3000.  Returns
  3001.     <expL> for success
  3002.  Category
  3003.     NETWORK
  3004.  Syntax
  3005.     SNET_USE(<expC1>,<expC2>,<expL1>,<expN>,
  3006.         <expL2>,<expC3>
  3007.  Description
  3008.     Attempts to open a DBF file <expC1> with alias
  3009.     of <expC2>, opening EXCLUSIVE or NOT <expL1>.
  3010.     Tries <expN> times and then allows user to
  3011.     retry or not <expL2> by giving message <expC3>
  3012.     and asking YES/NO.
  3013.  Examples
  3014.     IF SNET_USE("CUSTOMER.DBF","CUSTOMER",;             .F.,5,.T.,"Unable to open CUSTOMER.DBF.;            Try again?")
  3015.         SET INDEX TO CUSTOMER,ACCTNO
  3016.     ELSE
  3017.         MSG("Unable to proceed, returning to;               menu")
  3018.         loop
  3019.     ENDIF
  3020.  File
  3021.     S_SNETU.PRG
  3022.  
  3023. ---------------------------------------------------------------------
  3024. FUNCTION: SREC_LOCK()      Attempts to lock a record
  3025.  
  3026.     Attempts to lock a record
  3027.  Returns
  3028.     <expL> success
  3029.  Category
  3030.     NETWORK
  3031.  Syntax
  3032.     SREC_LOCK(<expN>,<expL>,<expC>)
  3033.  Description
  3034.     Attempts to lock current record.
  3035.     Tries <expN> times and then allows user to
  3036.     retry or not <expL2> by giving message <expC3>
  3037.     and asking YES/NO.
  3038.  Examples
  3039.     IF SREC_LOCK(5,.T.,"Unable to lock record. ;            Try again?")
  3040.         REPLACE XXX WITH YYY, ZZZ WITH BBB
  3041.         UNLOCK
  3042.     ELSE
  3043.         LOOP
  3044.     ENDIF
  3045.  File
  3046.     S_SRECLO.PRG
  3047.  
  3048. ---------------------------------------------------------------------
  3049. FUNCTION: STANDARD()       Returns color integer for standard setting
  3050.  
  3051.     Returns color integer for standard setting
  3052.  Returns
  3053.     nothing
  3054.  Category
  3055.     Screen
  3056.  Syntax
  3057.     <expN> = STANDARD()
  3058.  Description
  3059.     Returns numeric color integer for use with
  3060.     functions which require it like ATT(), PRNT().
  3061.  Examples
  3062.     stan = standard()+128   && blinking
  3063.     PRNT(10,10,"Waiting...",m->stan)
  3064.  File
  3065.     S_STAN.PRG
  3066.  
  3067. ---------------------------------------------------------------------
  3068. FUNCTION: STARTSW()        Determines if a string starts with another string
  3069.  
  3070.     Determines if a string starts with another string
  3071.  Returns
  3072.     <expL>
  3073.  Category
  3074.     Logical
  3075.  Syntax
  3076.     STARTSW(<expC>,<expC)
  3077.  Description
  3078.     Determines if string 1 <expC1> starts with
  3079.     string 2 <expC2>
  3080.  Examples
  3081.     str1    = "SUPERFUNCTION"
  3082.     str2    = "SUPER"
  3083.     str3    = "SOUP"
  3084.     STARTSW(str1,str2) returns .t.
  3085.     STARTSW(str1,str3) returns .f.
  3086.  File
  3087.     S_STARTS.PRG
  3088.  
  3089. ---------------------------------------------------------------------
  3090. FUNCTION: STOD()           Returns date from string in the form YYYYMMDD
  3091.  
  3092.     Returns date from string in the form YYYYMMDD
  3093.  Returns
  3094.     <expD> date from string
  3095.  Category
  3096.     Date
  3097.  Syntax
  3098.     STOD(<expC>)
  3099.  Description
  3100.     Returns date from string of the form YYYYMMDD <expC>
  3101.  Examples
  3102.     strdate = "19890102"
  3103.     newdate = STOD(strdate)
  3104.     (returns 01/01/89 type date)
  3105.  File
  3106.     S_STOD.PRG
  3107.  
  3108. ---------------------------------------------------------------------
  3109. FUNCTION: STRETCH()        Imbeds characters in a string
  3110.  
  3111.     Imbeds characters in a string
  3112.  Returns
  3113.     <expC> string with characters imbedded
  3114.  Category
  3115.     String
  3116.  Syntax
  3117.     STRECH(<expC>,<expC>,<expN>)
  3118.  Description
  3119.     Imbeds character <expC2> in string <expC1>
  3120.     every <expN> character
  3121.  Examples
  3122.     string = "SUPERFUNCTION"
  3123.     string = STRETCH(string,' ',1)
  3124.     (returns "S U P E R F U N C T I O N")
  3125.  Notes
  3126.     This hombre might be called EXPAND in other parts
  3127.  File
  3128.     S_STRETC.PRG
  3129.  
  3130. ---------------------------------------------------------------------
  3131. FUNCTION: STRIP_PATH       Strips path from a filespec
  3132.  
  3133.     Strips path from a filespec
  3134.  Returns
  3135.     <expC> file name with or without extension
  3136.  Category
  3137.     NETWORK
  3138.  Syntax
  3139.     STRIP_PATH(<expC>,<expL>)
  3140.  Description
  3141.     Takes filespec <expC> and strips away drive
  3142.     and directory information. If <expL> = .t.,
  3143.     also strips away extension.
  3144.  Examples
  3145.     STRIP_PATH("C:\OGRE\WITCH\FORMULA.DBF",.F.)
  3146.      = "FORMULA.DBF"
  3147.     STRIP_PATH("C:\OGRE\WITCH\FORMULA.DBF",.T.)
  3148.      = "FORMULA"
  3149.  File
  3150.     S_STRPAT.PRG
  3151.  
  3152. ---------------------------------------------------------------------
  3153. FUNCTION: STRPULL()        Extract text between 2 characters
  3154.  
  3155.     Extract text between 2 characters
  3156.  Returns
  3157.     <expC> text extracted
  3158.  Category
  3159.     String
  3160.  Syntax
  3161.     STRPULL(<expC>,<expC>,<expC>)
  3162.  Description
  3163.     Extracts text from <expC1> between characters
  3164.     <expC2> and <expC3>.
  3165.     If <expC2> is empty, uses beginning of <expC1>.
  3166.     If <expC3> is empty, uses end of <expC1>.
  3167.  Examples
  3168.     string = "SUPERFUNCTION"
  3169.     string = STRPULL(string,'E','C')
  3170.     (returns "RFUN")
  3171.  File
  3172.     S_STRPUL.PRG
  3173.  
  3174. ---------------------------------------------------------------------
  3175. FUNCTION: SUBPLUS()        Returns multiple substrings
  3176.  
  3177.     Returns multiple substrings
  3178.  Returns
  3179.     <expC> new string from multiple substrings
  3180.  Category
  3181.     String
  3182.  Syntax
  3183.     SUBPLUS(<expC>,<expN1>...<expN8>)
  3184.  Description
  3185.     Extracts from string <expC> from position
  3186.     <expN1> for <expN2>, <expN3> for <expN4>
  3187.     etc.
  3188.  Examples
  3189.     string = "PREFONTAINE"
  3190.     garble = SUBPLUS(string,6,1,5,1,1,1,3,1)
  3191.     ?garble  =  "NOPE"
  3192.  File
  3193.     S_SUBPLU.PRG
  3194.  
  3195. ---------------------------------------------------------------------
  3196. FUNCTION: SUM_AVE()        Interactive sum or average on a dbf field
  3197.  
  3198.     Interactive sum or average on a dbf field
  3199.  Returns
  3200.     nothing
  3201.  Category
  3202.     Metafunction
  3203.  Syntax
  3204.     SUM_AVE([expC])
  3205.  Description
  3206.     Does a SUM or AVERAGE on a selected numeric
  3207.     field
  3208.  Options
  3209.     [expC] "SUM" or "AVE". Default is "SUM"
  3210.  Examples
  3211.     case choice = 3  && sum
  3212.       SUM_AVE("SUM")
  3213.     case choice = 4  && average
  3214.       SUM_AVE("AVE")
  3215.  Notes
  3216.     If QUERY_EXP is present  - public variable
  3217.     used by QUERY() -  optional SUM or AVERAGE
  3218.     for QUERY_EXP can be done.
  3219.  File
  3220.     S_SUMAV.P
  3221.  
  3222. ---------------------------------------------------------------------
  3223. FUNCTION: TAGIT()          Allows tagging of dbf records for later action
  3224.  
  3225.     Allows tagging of dbf records for later action
  3226.  Returns
  3227.     nothing - modifies array passed by reference
  3228.  Category
  3229.     Metafunction
  3230.  Syntax
  3231.     TAGIT(<array1>,[array2],[array3],[expC])
  3232.  Description
  3233.     Performs a no-touch tag on records in the dbf.
  3234.     It does this by filling <array1> - an array
  3235.     which you need to initialize to the max # of
  3236.     records you want to tag - with tagged record
  3237.     numbers.
  3238.     DBEDIT() is called with a UDF to show on
  3239.     screen what records have been tagged.
  3240.     Ascan may then be used with the array to
  3241.     evaluate to a logical condition for searches,
  3242.     copies, printing etc. with the general
  3243.     syntax of: (ascan(<array1>,recno()) > 0)
  3244.  Options
  3245.     [array2] and [array3] may be passed as fields
  3246.     and field descriptions. These are then passed
  3247.     to DBEDIT() as the fields and titles arrays.
  3248.     [expC] is a title for the dbedit box
  3249.  Examples
  3250.     private tag[100]
  3251.     tagit(tag,"","","Tag records to copy")
  3252.     copy to temp for (ascan(tag,recno()) > 0)
  3253.  File
  3254.     S_TAG.PRG
  3255.  
  3256. ---------------------------------------------------------------------
  3257. FUNCTION: TIMEPER()        Time Period (date sensitive) DBF analysis
  3258.  
  3259.     Time Period (date sensitive) DBF analysis
  3260.  Returns
  3261.     nothing
  3262.  Category
  3263.     Metafunction
  3264.  Syntax
  3265.     TIMEPER([array1],[array2],[array3])
  3266.  Description
  3267.     Does a menu-driven time/date sensitive
  3268.     analysis of a DBF based on DATE type fields
  3269.     in the DBF, by sorting data into time periods
  3270.     Time periods can be:
  3271.         A By Week
  3272.         B Week to Date
  3273.         C By Month
  3274.         D Month to Date
  3275.         E By Year
  3276.         F Year to date
  3277.         G User defined
  3278.     Additional numeric fields may be tallied
  3279.     withing each time period.
  3280.  Options
  3281.     [array1] array of field names
  3282.     [array2] array of field descriptions
  3283.     [array3] array of currently open indexes
  3284.         for re-opening on exit
  3285.  Warnings
  3286.     Restore your indexes after using this function,
  3287.     as it creates a new index and you will lose the
  3288.     SET INDEX...unless you pass the third param
  3289.     as an array of open indexes
  3290.  Examples
  3291.     private flds[3],fdes[3],openntx[3]
  3292.     flds[1] = "fname"
  3293.     flds[2] = "lname"
  3294.     flds[3] = "mi"
  3295.     fdes[1] = "First Name"
  3296.     fdes[2] = "Last Name"
  3297.     fdes[3] = "Middle Initial"
  3298.     openntx[1]="CUSTOMER"
  3299.     openntx[2]="CITY"
  3300.     openntx[3]="STATE"
  3301.     TIMEPER(flds,fdes,openntx) && pass both or none
  3302.         && of the 1st two arrays
  3303.     ...or
  3304.     openntx[1]="CUSTOMER"
  3305.     openntx[2]="CITY"
  3306.     openntx[3]="STATE"
  3307.     TIMEPER("","",openntx) && pass nulls for   &&first 2 params
  3308.  File
  3309.     S_TIME.PRG
  3310.  
  3311. ---------------------------------------------------------------------
  3312. FUNCTION: TODOLIST()       Simple todo list manager
  3313.  
  3314.     Simple todo list manager
  3315.  Returns
  3316.     Nothing
  3317.  Category
  3318.     Metafunction
  3319.  Syntax
  3320.     TODOLIST()
  3321.  Description
  3322.     Pops up a simple TODO list interface,
  3323.     allowing the user to enter in things 'To do'
  3324.     by Description, Category ,Priority and Date
  3325.     Due. These categories may be sorted, filtered
  3326.     and printed.
  3327.  Examples
  3328.     TODOLIST()
  3329.  File
  3330.     S_TODO.PRG
  3331.  
  3332. ---------------------------------------------------------------------
  3333. FUNCTION: TRUEVAL()        Returns val of ALL numerics in a string
  3334.  
  3335.     Returns val of ALL numerics in a string
  3336.  Returns
  3337.     <expN> value
  3338.  Category
  3339.     Conversion
  3340.  Syntax
  3341.     TRUEVAL(<expC>)
  3342.  Description
  3343.     Removes all non-numeric characters from a string,
  3344.     and then converts it to numeric.
  3345.  Examples
  3346.     string = "SUPERFUNCTION Library version 1.50"
  3347.     number = TRUEVAL(string)
  3348.     (returns 1.50)
  3349.  File
  3350.     S_TRUEVA.PRG
  3351.  
  3352. ---------------------------------------------------------------------
  3353. FUNCTION: UNBOX()          Removes a box created by makebox()
  3354.  
  3355.     Removes a box created by makebox()
  3356.  Returns
  3357.     nothing
  3358.  Category
  3359.     Popup
  3360.  Syntax
  3361.     Unbox(<expC>,[expN1..expN4])
  3362.  Description
  3363.     UNBOX restores the screen <expC> saved by
  3364.     MAKEBOX(). MAKEBOX() stores the dimensions
  3365.     and color in the returned string, so it is not
  3366.     necessary to pass these to UNBOX(). If the dimensions are passed, UNBOX() assumes these are not part of the saved string, and assumes the string is a savescreen() string. If the string and any other
  3367.     single param are passed, UNBOX() assumes it is
  3368.     a full screen (0,0,24,79) restore and does so.
  3369.  Options
  3370.     [expN1..expN4] - the dimensions of the box.
  3371.     Use these to UNBOX() a screen saved with SAVESCREEN().
  3372.  Examples
  3373.     msg = MAKEBOX(10,40,12,60,'W/R,+GR/R')
  3374.     @11,42 SAY "What's up, Doc ?"
  3375.     inkey(0)
  3376.     UNBOX(m->msg)
  3377.     ..or unboxing a SAVESCREEN() screen
  3378.     msg = savescreen(5,5,10,10)
  3379.     *code
  3380.     unbox(msg,5,5,10,10)
  3381.     ..or unboxing a full screen
  3382.     save screen to msg
  3383.     *code
  3384.     unbox(msg,<anyparam>)
  3385.  File
  3386.     S_UNBOX.PRG
  3387.  
  3388. ---------------------------------------------------------------------
  3389. FUNCTION: UNIQFNAME()      Creates a unique file name
  3390.  
  3391.     Creates a unique file name
  3392.  Returns
  3393.     <expC> file name
  3394.  Category
  3395.     NETWORK
  3396.  Syntax
  3397.     UNIQFNAME(<expC1>,<expC2>,[expC3])
  3398.  Description
  3399.     Attempts to create a unique file name
  3400.     <expC1> extension for file
  3401.     <expC2> path to check
  3402.  Options
  3403.     [expC3] prefix (first letter) of file name
  3404.     (defaults to U)
  3405.  Examples
  3406.     tempfile = UNIQFNAME("DBF","")
  3407.     tempfile = UNIQFNAME("NTX","C:\local\")
  3408.  File
  3409.     S_UNIQF.PRG
  3410.  
  3411. ---------------------------------------------------------------------
  3412. FUNCTION: UNSELECTED()     Returns color integer for UNSELECTED setting
  3413.  
  3414.     Returns color integer for UNSELECTED setting
  3415.  Returns
  3416.     <expN> numeric color integer
  3417.  Category
  3418.     Screen
  3419.  Syntax
  3420.     <expN> = unsel
  3421.  Description
  3422.     Returns numeric color integer for use with
  3423.     functions which require it like ATT(), PRNT().
  3424.  Examples
  3425.     enhan= enhanced()+128   && blinking
  3426.     PRNT(10,10,"Waiting...",m->enhan)
  3427.  File
  3428.     S_UNSEL.PRG
  3429.  
  3430. ---------------------------------------------------------------------
  3431. FUNCTION: VAR2CHAR()       Converts any type variable to character type
  3432.  
  3433.     Converts any type variable to character type
  3434.  Returns
  3435.     <expC> character
  3436.  Category
  3437.     String
  3438.  Syntax
  3439.     Var2char(<expC>)
  3440.  Description
  3441.     Converts variable named in <expC> to type
  3442.     character
  3443.  Examples
  3444.     dtype = ctod("01/01/80")
  3445.     ntype = 128.45
  3446.     ltype = .t.
  3447.     VAR2CHAR("dtype") returns "01/01/80"
  3448.     VAR2CHAR("ntype") returns "128.45"
  3449.     VAR2CHAR("ltype") returns ".t."
  3450.  Warnings
  3451.     Numerics will be returned with a length of 10 minimum
  3452.     You may wish to trim this.
  3453.  Notes
  3454.     Returns memo types as ""
  3455.  File
  3456.     S_VAR2.PRG
  3457.  
  3458. ---------------------------------------------------------------------
  3459. FUNCTION: VARLEN()         Returns length of a variable  of any type
  3460.  
  3461.     Returns length of a variable  of any type
  3462.  Returns
  3463.     Length of variable
  3464.  Category
  3465.     Editing
  3466.  Syntax
  3467.     Varlength(exp?]
  3468.  Description
  3469.     Converts exp? to character with VAR2CHAR() and
  3470.     then returns its length
  3471.  Examples
  3472.     VARLEN(123.45) returns 6
  3473.     VARLEN(.F.) returns 3
  3474.     VARLEN(DATE()) returns 8
  3475.  File
  3476.     S_VARLEN.PRG
  3477.  
  3478. ---------------------------------------------------------------------
  3479. FUNCTION: VIEWPORT()       Multi-optional data entry engine
  3480.  
  3481.     Multi-optional data entry engine
  3482.  Returns
  3483.     nothing
  3484.  Category
  3485.     Metafunction
  3486.  Syntax
  3487.     VIEWPORT([expL],[array1...array7],[expL])
  3488.  Description
  3489.     Presents a generic data entry screen with multiple
  3490.     movement, search, view and editing capabilities.
  3491.  Options
  3492.     [expL] Logical - this is .T. if you want to give
  3493.     the user Add,Edit,Delete, and .F. if not. Defaults
  3494.     to .T.
  3495.     Arrays 1-5 and array 7 must have the same # of
  3496.     elements. (default is # of fields in DBF). You may
  3497.     pass a .f. or a "" to bypass and activate the
  3498.     default.
  3499.     [array1] An array of field names. Defaults to
  3500.     all fields in DBF.
  3501.     [array2] An array of field descriptions. Defaults
  3502.     to field names. You must pass array1 if you wish
  3503.     to pass array2.
  3504.     [array3] is an array of PICTURES as Character
  3505.     expressions to correspond with the FIELDS
  3506.     array. Default is pictures as derived by ED_G_PIC()
  3507.     If you pass this array, each element must contain
  3508.     at least a "".
  3509.     [array4] is an array of VALID clauses and messages
  3510.     to correspond with the FIELDS array. Each
  3511.     is in the form "{valid clause};{valid message}"
  3512.     The FIELD is represented as a token "@@" in the
  3513.     valid clause which is replaced with the current
  3514.     edited value at edit time.
  3515.     i.e.
  3516.     "!empty(@@);Must not be empty"
  3517.     If you pass this array, each element must contain
  3518.     at least a "".
  3519.     [array5] is an array of Lookup definitions corresponding
  3520.     to the FIELDS array. These are delimited strings
  3521.     with 1-4 component parts matching the first
  3522.     four parameters of SMALLS(). Delimiter is a
  3523.     semicolon (;). As an example, to make a
  3524.     lookup definition corresponding to the COMPANY
  3525.     field in the FIELDS array, which will lookup
  3526.     on the field CORPNAME in the database INSTIT,
  3527.     titling the box "Company" and KEYBOARDing
  3528.     the contents of CORPNAME if CR pressed :
  3529.     "CORPNAME;Company;%INSTIT;CORPNAME".
  3530.     If you realize that these 4 components are
  3531.     parsed and sent as parameters to SMALLS(), you
  3532.     will get the idea.
  3533.     If you pass this array, each element must contain
  3534.     at least a "".
  3535.     [array6] [1-9] Character - each of elements 1-9
  3536.     is a delimited string in the format
  3537.     "{option};{action}" where option is
  3538.     a displayed menu option and action is
  3539.     a proc to be executed. i.e.:
  3540.     "Form Letters;FORMLETR()"
  3541.     "List Myfile;FILEREAD(2,2,22,78,'FMYFILE.TXT')"
  3542.     Pass 1-9 option/proc combinations. These will
  3543.     be presented as an 'Other' menu.
  3544.     THESE PROCS MUST BE DECLARED EXTERNAL!!!
  3545.     [array7] Logical - matches the FIELDS array and
  3546.     defines which fields may be edited (.t.) and
  3547.     which are display only (.f.)
  3548.     If you pass this array, each element must be of
  3549.     TYPE Logical.
  3550.     [expL] Logical - pop up 'Carry Forward' message
  3551.     when adding? True/False. Default is True.
  3552.  Examples
  3553.     use register
  3554.     private flds[fcount()]
  3555.     private fdes[fcount()]
  3556.     private fval[fcount()]
  3557.     private floo[fcount()]
  3558.     private fedit[fcount()]
  3559.     afields(flds)
  3560.     afields(fdes)
  3561.     afill(fval,"")
  3562.     afill(floo,"")
  3563.     afill(fedit,.t.)
  3564.     - valids for fields 5 and 6
  3565.     fval[5]="!empty(@@);Cannot be empty"
  3566.     fval[6]="!empty(@@);Cannot be empty"
  3567.     *   *- lookups for fields 5 and 6
  3568.     floo[5] = "First;First Name;%user%;trim(first)"
  3569.     floo[6] = "Last;Last Name;%user;trim(Last)"
  3570.     *- 'other' menu array
  3571.     private oth[3]
  3572.     oth[1] = "Read PRG;FILEREAD(1,1,23,79,'s_viewp.prg')"
  3573.     oth[2] = "Do Form Letters ;FORMLETR()"
  3574.     oth[3] = "Frequency Analysis;FREQANAL()"
  3575.     * be sure the 'other' procs are pulled in
  3576.     EXTERNAL FILEREAD,FREQANAL,FORMLETR
  3577.     VIEWPORT(.t.,flds,fdes,.f.,fval,floo,oth)
  3578.  File
  3579.     S_VIEWP.PRG
  3580.  
  3581. ---------------------------------------------------------------------
  3582. FUNCTION: WOMONTH()        Calculates week of the month (# of 7 day periods)
  3583.  
  3584.     Calculates week of the month (# of 7 day periods)
  3585.  Returns
  3586.     <expN> week of the month
  3587.  Category
  3588.     Date
  3589.  Syntax
  3590.     WOMONTH(<expD>)
  3591.  Description
  3592.     Calculates current number of 7 day periods for
  3593.     the month from <expD>
  3594.  Examples
  3595.     adate = ctod("10/15/90")
  3596.     dom = WOMONTH(adate)
  3597.     (returns 3)
  3598.  File
  3599.     S_WOMON.PRG
  3600.  
  3601. ---------------------------------------------------------------------
  3602. FUNCTION: WOYEAR()         Calculates week of the year (# of 7 day periods)
  3603.  
  3604.     Calculates week of the year (# of 7 day periods)
  3605.  Returns
  3606.     <expN> week of the year of date
  3607.  Category
  3608.     Date
  3609.  Syntax
  3610.     WOYEAR(<expD>)
  3611.  Description
  3612.     Calculates number of 7 day periods passed for
  3613.     the year from <expD>
  3614.  Examples
  3615.     adate = ctod("10/15/90")
  3616.     dom = WOYEAR(adate)
  3617.     (returns 40)
  3618.  File
  3619.     S_WOYEAR.PRG
  3620.  
  3621. ---------------------------------------------------------------------
  3622. FUNCTION: WRITEFILE()      Writes a line or lines  to a text file
  3623.  
  3624.     Writes a line or lines  to a text file
  3625.  Returns
  3626.     nothing
  3627.  Category
  3628.     File
  3629.  Syntax
  3630.     Writefile(<expC1|expN>,<expC2>)
  3631.  Description
  3632.     Writes line(s) of text with CR LF to
  3633.     a file referenced either as a file handle
  3634.     <expN> or a filename <expC1>. Writes either
  3635.     a single line contained in <expC2> or all
  3636.     of the contents of a character array named
  3637.     as <expC2> to the file.
  3638.  Examples
  3639.     1. WRITEFILE('ERROR.TXT','THERE WAS AN ERROR')
  3640.     2. declare errors[3]
  3641.         errors[1] = 'There was an error'
  3642.         errors[2] = 'Error # 61765  '
  3643.         errors[3] = dtoc(date)
  3644.         writefile('ERROR.TXT','ERRORS')
  3645.     3. handle = fopen("error.txt",1)
  3646.         declare errors[3]
  3647.         errors[1] = 'There was an error'
  3648.         errors[2] = 'Error # 61765  '
  3649.         errors[3] = dtoc(date())
  3650.         writefile(handle,'ERRORS')
  3651.  Notes
  3652.     If a filename is passed, the file is opened and
  3653.     closed by the function.
  3654.     If a file handle is passed, the file is left open.
  3655.     If a character array name is passed, each element is
  3656.     written to a seperate line in the file.
  3657.     Do not pass an array - pass an array name in quotes
  3658.     If the file does not exist, it is created.
  3659.  File
  3660.     S_WRITEF.PRG
  3661.  
  3662.  
  3663.  
  3664.         C AND ASSEMBLER FUNCTIONS
  3665.         -------------------------
  3666.  
  3667. -----------------------------------------------------------------
  3668. FUNCTION::ALENG()     Determines initialized length of an array
  3669.  
  3670. ALENG()
  3671.  
  3672. Purpose :   Determines initialized length of an array
  3673. Usage   :   Aleng(<array>)
  3674. Params  :   <array> the array you wish to determine the
  3675.             length of
  3676. Returns :   Length of the array
  3677. Found in:   aleng.c
  3678.  
  3679. -----------------------------------------------------------------
  3680. FUNCTION::ATT()       Change attribute of area of the screen
  3681.  
  3682. ATT()
  3683.  
  3684. Purpose :   Change attribute of area of the screen
  3685. Usage:      Att(<expN1>, <expN2>, <expN3>, <expN4>,
  3686.                              <expN5>, [expC] )
  3687. Params  :   expN1 - top row
  3688.             expN2 - left col
  3689.             expN3 - bottom row
  3690.             expN4 - right column
  3691.             expN5 - attribute to set area
  3692.             expC  - character to fill area with
  3693. Returns :   nothing.
  3694. Found in:   att.c
  3695. -----------------------------------------------------------------
  3696. FUNCTION::ATTT()      Used by C functions to color a screen area
  3697.  
  3698. ATTT()
  3699.  
  3700. Purpose :   Used by C functions to color a screen area
  3701. Usage:      See relevent C functions. To be called from a
  3702.             C function ONLY. Use ATT() from Clipper.
  3703. Found in:   attt.c
  3704. -----------------------------------------------------------------
  3705. FUNCTION::BIGELEM()   Returns length of longest character element
  3706.  
  3707. BIGELEM()
  3708.  
  3709. Purpose :   Returns length of longest character element
  3710.             in array
  3711. Usage:      Bigelem(<array>)
  3712. Params  :   <array> the array you wish to determine
  3713.             longest element of
  3714. Returns :   Length of the longest element
  3715. Found in:   bigel.c
  3716. -----------------------------------------------------------------
  3717. FUNCTION::BXX()       Draw a box on the screen with attribute and shadow
  3718.  
  3719. BXX()
  3720.  
  3721. Purpose :   Draw a box on the screen with attribute and
  3722.             optional shadow
  3723. Usage:      Bxx(<expN1>, <expN2>, <expN3>, <expN4>,
  3724.             <expN5>, <expN6> <expN7>,<expC>)
  3725. Params  :   expN1 - top row
  3726.             expN2 - left col
  3727.             expN3 - bottom row
  3728.             expN4 - right column
  3729.             expN5 - attribute to box
  3730.             expN6 - numeric shadow type  (default 0)
  3731.             follow numeric keypad
  3732.                     7 = upper left
  3733.                     1 = lower left
  3734.                     3 = lower right
  3735.                     9 = upper right
  3736.                     0 = no shadow
  3737.             expN7 - shadow attribute (default 7 - grey on
  3738.                     black)
  3739.             expC  - frame string - MUST be 9 characters -
  3740.                     default single
  3741. Returns :   nothing.
  3742. Found in:   bxx.c
  3743. -----------------------------------------------------------------
  3744. FUNCTION::CAPSLOCK()  sets capslock on
  3745.  
  3746. CAPSLOCK()
  3747.  
  3748. Purpose :   sets capslock on
  3749. Usage:      Capslock()
  3750. Params  :   nada
  3751. Returns :   nada
  3752. Found in:   s_caps.c
  3753. -----------------------------------------------------------------
  3754. FUNCTION::CAPSLOFF()  sets capslock off
  3755.  
  3756. CAPSLOFF()
  3757.  
  3758. Purpose :   sets capslock off
  3759. Usage:      Capsloff()
  3760. Params  :   nada
  3761. Returns :   nada
  3762. Found in:   s_caps.c
  3763. -----------------------------------------------------------------
  3764. FUNCTION::CDIR()      Change to new directory
  3765.  
  3766. CDIR()
  3767.  
  3768. Purpose :   Change to new directory
  3769. Usage:      Cdir(<expC>)
  3770. Params  :   <expC> a valid directory on current drive
  3771. Returns :   .t. if succesful, .f. otherwise
  3772. Found in:   cdd.asm
  3773. -----------------------------------------------------------------
  3774. FUNCTION::C_GRID()    Draws screen in SETCOLORS() function
  3775.  
  3776. C_GRID()
  3777.  
  3778. Purpose :   Draws screen in SETCOLORS() function
  3779. Usage:      c_grid(<expN>,<expN>)
  3780. Params  :   <expN1-2> Coordinates of top-left corner
  3781. Returns :   nothing
  3782. Found in:   c_grid.c
  3783. -----------------------------------------------------------------
  3784. FUNCTION::CURD()      Return current drive letter
  3785.  
  3786. CURD()
  3787.  
  3788. Purpose :   Return current drive letter
  3789. Usage:      <expC>=CURD()
  3790. Params  :   None.
  3791. Example :   @10,10 say "Current Drive :"+curd()
  3792. Returns :   Current drive letter
  3793. Found in:   curd.c
  3794. -----------------------------------------------------------------
  3795. FUNCTION::FADEAWAY()  Fades a screen variable off the screen
  3796.  
  3797. FADEAWAY()
  3798.  
  3799. Purpose :   Fades a screen variable off the screen
  3800. Usage:      Fade(<expC>,<expN1..4>,<expN5>)
  3801. Params  :   expN1..4 - coordinates of the saved screen
  3802.             expC    - the saved screen
  3803.             expN5   - relative speed of fade  - try 10
  3804. Example :   fade(tbox,top,left,     bot,right,10)
  3805. Returns :   diddly
  3806. Found in:   fade.c
  3807. -----------------------------------------------------------------
  3808. FUNCTION::_GVIDM()    Used by Super - C functions to determine
  3809.  
  3810. _GVIDM()
  3811.  
  3812. Purpose :   Used by Super - C functions to determine
  3813.             video mode
  3814. Usage:      See relevent C functions. To be called from a
  3815.             C function ONLY. Use ISCOLOR() from
  3816.             Clipper.
  3817. Found in:   gvidm.asm
  3818. -----------------------------------------------------------------
  3819. FUNCTION::IMBOX()     Implodes a screen variable off the screen
  3820.  
  3821. IMBOX()
  3822.  
  3823. Purpose :   Implodes a screen variable off the screen
  3824. Usage:      Imbox(<expN1..4>,<expC>,<expN5>)
  3825. Params  :   expN1..4 - coordinates of the saved screen
  3826.             expC    - the saved screen
  3827.             expN5   - relative speed of implosion - try 20
  3828. Example :   imbox(box_top,box_left,;
  3829.             box_bot,box_right,tbox,20)
  3830. Returns :   diddly
  3831. Found in:   unbox.c
  3832. -----------------------------------------------------------------
  3833. FUNCTION::ISPRN()     Check if printer ready LPT1 LPT2 LPT3
  3834.  
  3835. ISPRN()
  3836.  
  3837. Purpose :   Check if printer ready LPT1 LPT2 LPT3
  3838. Usage:      Isprn<expN>)
  3839. Params  :   LPT1 - 0,  LPT2 - 1, LPT3 - 2
  3840. Example :   if ISPRN(0)
  3841. Returns :   <expL> indicating printer ready/online
  3842. Found in:   isprn.asm
  3843. -----------------------------------------------------------------
  3844. FUNCTION::NEWDRV()    Change to a new drive
  3845.  
  3846. NEWDRV()
  3847.  
  3848. Purpose :   Change to a new drive
  3849. Usage:      Newdrv(<expC>)
  3850. Params  :   expC - drive letter (ABCDE..)
  3851. Example :   Newdrv("C")
  3852. Returns :   diddly
  3853. Found in:   newdr.asm
  3854. -----------------------------------------------------------------
  3855. FUNCTION::PRNT()      Write string to row/col with attribute
  3856.  
  3857. PRNT()
  3858.  
  3859. Purpose :   Write string to row/col with attribute
  3860. Usage:      Prnt(<expN1>, <expN2>, <expC>, <expN3>)
  3861. Params  :   expN1 - row
  3862.             expN2 - col
  3863.             expC  - String to write
  3864.             expN3 - color attribute of string
  3865. Example :   Prnt(10,10,"Hello, Dolly , yes hello,Dolly",23)
  3866. Found in:   prnt.c
  3867. -----------------------------------------------------------------
  3868. FUNCTION::SET()       Grabs S87 internals to emulate Clipper 5 SET()
  3869.  
  3870. SET()
  3871.  
  3872. Purpose :   Grabs S87 internals to emulate Clipper 5.0's
  3873.             SET() command. Supports a subset of 5.0's
  3874.             SET() command for use with Super.Lib. Does
  3875.             not take a 2nd param, like 5.0's SET(). The
  3876.             numbering system corresponds to Clipper
  3877.             5.0's SET settings. There are other internals
  3878.             that could emulate other SET() settings, but
  3879.             these were all I needed for Super.Lib.
  3880. Usage:      set(<expN>)
  3881. Params  :   <expN> - the number of the internal setting
  3882.             (see list below)
  3883.             #  Setting              Returns
  3884.             ----------------------------------
  3885.             7  DEFAULT              C
  3886.             16 CURSOR ON/OFF        N (0=off,1=on)
  3887. Found in:   S87SET.C
  3888. -----------------------------------------------------------------
  3889. FUNCTION::SETKEY()    Grabs S87 internals to emulate Clipper 5 SETKEY()
  3890.  
  3891. SETKEY()
  3892.  
  3893. Purpose :   Grabs S87 internals to emulate Clipper 5.0's
  3894.             SETKEY() command, except param # 2 is not
  3895.             a code block but a pointer.
  3896. Usage:      SETKEY(<expN>,[expX])
  3897. Params  :   <expN> - the inkey value of the SET KEY
  3898. Options :   [ExpX] - a previously returned value from
  3899.             SETKEY()
  3900. Example :   * save F1
  3901.             oldF1 = SETKEY(28)
  3902.             ..code..
  3903.             * restore F1
  3904.             SETKEY(28,oldF1)
  3905. Found in:   S87SETK.C
  3906.  
  3907. -----------------------------------------------------------------
  3908. FUNCTION::SHIFTR()    Slides a screen variable off the screen
  3909. Function:   Shiftr()
  3910. Purpose :   Slides a screen variable off the screen
  3911. Usage:      Shiftr(<expC>,<expN1..4>,<expN5>)
  3912. Params  :   expN1..4 - coordinates of the saved screen
  3913.             expC    - the saved screen
  3914.             expN5   - relative speed of shift - try 3
  3915.             (based on # of columns per shift)
  3916. Example :   Shiftr(tbox,box_top,box_left,;
  3917.              box_bot,box_right,3)
  3918. Returns :   diddly
  3919. Found in:   shift.c
  3920. -----------------------------------------------------------------
  3921. FUNCTION::TAKEOUT()   Extract section of a string between delimiters
  3922.  
  3923. TAKEOUT()
  3924.  
  3925. Purpose :   Extract section of a string between delimiters
  3926. Usage:      Takeout(<expC1>, <expC2>, <expN>)
  3927. Params  :   expC1 - string
  3928.             expC2 - delimiter  (beginning and end of
  3929.             string are considered delimiters)
  3930.             expN  - occurance
  3931. Example :   takeout("Next:Previous:First:Quit",":",3)
  3932.             returns "First"
  3933. Returns :   Section of string between delimiters,
  3934.             occurance <expN>.
  3935. Found in:   between.c
  3936. -----------------------------------------------------------------
  3937. FUNCTION::_WILDCARD() Wild Card String Compare.
  3938.  
  3939. _WILDCARD()
  3940.  
  3941. Purpose :   Wild Card String Compare.
  3942. Usage:      <expL> = _wildcard(<expC>,<expC>)
  3943. Params  :   <expC1> - model/wildcard pattern to search
  3944.             for <expC2> - string to compare with model/
  3945.             pattern
  3946.             Model/Pattern description
  3947.             ------------------------
  3948.             String of wild cards interspersed with literal
  3949.             text to compare against the contents of
  3950.             <expC2>.  The following conventions for
  3951.                       wild cards are followed:
  3952.             "*"     stands for any group of characters.
  3953.                     For example:
  3954.                     W*r     gives fields beginning with
  3955.                             "W", ending with "r"
  3956.                     *w*r    gives fields having "w"
  3957.                             before last character "r"
  3958.  
  3959.             "?"     stands for any single character.  For
  3960.                     example:
  3961.                     J?n?s   gives Janes, Janus, Jones, and so on.
  3962. Example :   _wildcard("Fi?sewa*rma?", "Fitswatterman" )
  3963.             returns -> True
  3964.             _wildcard("banana??*","Fitswatterman")
  3965.             returns -> False
  3966. Credits :   07/24/89  PAT WEISSER   Converted from Clipper to C.
  3967.             03/07/90  GARRY PREFONTAINE  For use in SuperFunction Lib
  3968. Found in:   wildcard.c
  3969. -----------------------------------------------------------------
  3970. FUNCTION::XBXX()      Draw a box on the screen with attribute and
  3971.  
  3972. XBXX()
  3973.  
  3974. Purpose :   Draw a box on the screen with attribute and
  3975.             optional shadow
  3976. Usage:      Bxx(<expN1>, <expN2>, <expN3>, <expN4>,
  3977.                 <expN5>, <expN6> ,<expN7>, <expC>,<expn8>)
  3978. Params  :   expN1 - top row
  3979.             expN2 - left col
  3980.             expN3 - bottom row
  3981.             expN4 - right column
  3982.             expN5 - attribute of box
  3983.             expN6 - numeric shadow type  (default 0)
  3984.             follow numeric keypad
  3985.                     7 = upper left
  3986.                     1 = lower left
  3987.                     3 = lower right
  3988.                     9 = upper right
  3989.                     0 = no shadow
  3990.             expN7 - shadow attribute (default 7 - grey on
  3991.                     black)
  3992.             expC  - frame string - MUST be 8 characters - default single
  3993.             expN8 - explode speed factor 1-1000 (depends on machine)
  3994.             All params MUST be passed. For numerics,pass -1 for default.
  3995.             For string, pass '' for default.
  3996. Returns :   nothing.
  3997. Found in:   xbxx.c
  3998.  
  3999.  
  4000.